what is difference between config() and run() method in angularjs?
This is typically where you would configure application-wide stuff, such as the $routeProvider. Stuff that needs to be configured before the services are created. Run blocks (registered with module. run() ) get executed after the injector has all the providers.