1

If it possible, I want call some function in one controller which will load data to another component's controller.

Rob
  • 14,746
  • 28
  • 47
  • 65
  • 1
    use 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 Answers1

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