Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is difference between config() and run() method in AngularJS?



What is difference between config() and run() method in AngularJS?..

Answer / chaitanya

Configuration block – This block is executed during the provider registration and configuration phase. Only providers and constants can be injected into configuration blocks. This block is used to inject module wise configuration settings to prevent accidental instantiation of services before they have been fully configured. This block is created using config() method.

Run block – This block is executed after the configuration block. It is used to inject instances and constants. This block is created using run() method. This method is like as main method in C or C++. The run block is a great place to put event handlers that need to be executed at the root level for the application. For example, authentication handlers.

Is This Answer Correct ?    54 Yes 3 No

Post New Answer

More AngularJS Interview Questions

Is angularjs hard to learn?

0 Answers  


What is ivy renderer?

0 Answers  


What is angular module factory?

0 Answers  


what is directive and mention what are the different types of directive?

0 Answers  


In how many ways the Data Binding can be done?

0 Answers  


Does google own angular?

0 Answers  


What is primeng? How can it be used with angular 2?

0 Answers  


What is jit and aot in angular?

0 Answers  


What do you understand by rest in angular?

0 Answers  


What is the scope of a $scope?

0 Answers  


What are the basic steps to unit test an angularjs filter?

0 Answers  


What are inbuilt pipes?

0 Answers  


Categories