99
rated 0 times
[
102]
[
3]
/ answers: 1 / hits: 62013
/ 10 Years ago, mon, june 9, 2014, 12:00:00
I am working on an AngularJs project. I have a service which sets and removes events on some buttons. This service is utilized by another service which I do not want to interact directly with the buttons. However I would like a button click event to be filtered up through the first service and handled in the second one. Since I don't want the second service to be aware of the buttons, I figure I will need to create a custom event in the first service. How can I create a custom event and fire it when a button is clicked?
Thanks in advance.
More From » angularjs