|
|
|
|
|
by guac
4768 days ago
|
|
> Constants are especially interesting because they can be injected into the .config function of a module. No other provider can be injected for the very good reason that .config cannot inject transitive dependencies. It should be noted than you can inject providers themselves in .config. Most users do this with built-in $routeProvider (which provides $route). It's not mentioned in the post but he could pass "awesomeProvider" into module.config and (if it was more interesting than just a $get method) do something with it during the config phase. With $routeProvider you would use the .when method to configure angular routing. It's .$get method returns the $route instance. |
|