How do you share data between controllers?



How do you share data between controllers?..

Answer / Balvinder Singh

Data can be shared between AngularJS controllers by defining a service and injecting it into both controllers. Services are designed for this purpose: to hold application-level data and behavior.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What are angular 2 hooks?

1 Answers  


What is life cycle hook in angular?

1 Answers  


What are some differences between angular 2 and 4?

1 Answers  


List at down the ways in which you can communicate between applications modules using core angular functionality.

1 Answers  


What a digest cycle is in angularjs?

1 Answers  


What are directive behaviors?

1 Answers  


What is component in angularjs 2 ?

1 Answers  


What are the filters in angular js?

1 Answers  


How to implement caching in angular 1.x?

1 Answers  


What is single page application?

1 Answers  


Is angular open source?

1 Answers  


What is root injector in angular?

1 Answers  


Categories