In Angular 1.2, ngRoute is a separate module so you can use other community routers like ui.router instead.
ngRoute
ui.router
I\'m writing an open-source mod
I would test for the service instead of the module itself.
// In controller if($injector.has('$route')){ } if($injector.has('$state')){ } // In angular config if($injector.has('$routeProvider')){ } if($injector.has('$stateProvider')){ }