AngularJS: Difference between $route and $routerProvider?
angularjs, javascript
Solution
Services are singletons. They are instantiated the first time they are needed. Sometimes you have to configure a service before running it, for example in the `.config` part of the application module. This is where you use `$routeProvider`. After this, you can use the service instance (e.g. `$route`) normally, for example in the `.run` block of the app module. Notice that with `$routeProvider` you define the routes (a configuration) and with `$route` you use methods that depend on the configuration.
There are three ways of defining services: the simplest is using `service`, then you can also use a `factory` and, if you need complex configuration, you use a `provider` AngularJS: Service vs provider vs factory
Problem
Can anyone explain me difference between `$route`and `$routeProvider`?