Hi Ivan, I answered it on SO.
Regards Sander On Monday, April 25, 2016 at 4:30:30 PM UTC+2, Ivan Kravchenko wrote: > > I have a Controller A, which is responsible for displaying data in html > body. I also have another Controller B, which is located in directive for > displaying navigation. > > I'd like to pass data received from Controller B (say an array of > strings) to Controller A and after that make Controller A call method to > bind data to the body. > > So far I've figured out one but very ugly decision: to store data inside a > var variable in my module and access it with button click. > > Is there any way of making Controller B influence Controller A in the way > I want to? > > > I created a simple example at plnkr which doesnt seem to be working: > > http://plnkr.co/edit/eKiO3HF8AZkw1vktOr9C > > > Also there is a stackoverflow question related to that topic: > > > http://stackoverflow.com/questions/36822831/angularjs-calling-controller-from-another-one-in-directive > > > Thank you. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
