How to call method of a component from a controller?

Posted by Jessica Taylor | Updated on

Want to call method of a component from a controller? You can use on to have your component listen for an event from the controller, then you can use trigger in the controller to emit an event.

So in your component you might have something like this:

And in your controller you could have:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers