If it possible, I want call some function in one controller which will load data to another component's controller.
Asked
Active
Viewed 104 times
1
-
1use services for this – Sandeeproop Jun 21 '16 at 10:35
-
Or you can use controller aliases `ng-controller="ctrlNameA as ctrlA"` then you can do `ng-click="ctrlA.myFunction(ctrlB.something)"` if you need both controllers in the same view if not use service. – Stubbies Jun 21 '16 at 10:40
1 Answers
0
There are multiple ways to establish communication between controllers, it just depends on the level of abstraction you want in your application. Please have a look at these posts to get more idea about this: Share data between AngularJS controllers, Passing data between controllers in Angular JS?, Using services and messages to share data between controllers in AngularJs

Community
- 1
- 1

Gopal Yadav
- 368
- 2
- 8