Explain .config() and .run() methods in angularjs?



Explain .config() and .run() methods in angularjs?..

Answer / Atul Singh

.config() is a function in AngularJS used for configuration tasks that should be performed during the bootstrap process before any services are available. The $.provider chain is resolved during the configuration phase. On the other hand, .run() is used to execute expressions synchronously after all modules have been bootstrapped and all services have been instantiated.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

List some inbuilt pipes available in angular

1 Answers  


What is routing concepts in angular?

1 Answers  


What does a Subscribe method do in Angular 4?

1 Answers  


What is shadow dom and virtual dom?

1 Answers  


What is an angular 2 component?

1 Answers  


Explain the difference between angular service and factory? Explain

1 Answers  


What are angular js expressions?

1 Answers  


Please explain system.config.ts file used in angular?

1 Answers  


Explain the concept of scope hierarchy. In what ways can you use a directive?

1 Answers  


What is aot and jit in angular?

1 Answers  


What is routerstate in routers?

1 Answers  


What is observable and promise?

1 Answers  


Categories