Call Angular 2 Component Method From Html Event
Is it possible to call an angular component method from a html event? I can't use (click) because shape is not known by angula
Solution 1:
hack but what I asked for was a hack:
onclick="ng.probe(myparendcomponentid).componentInstance.mymethod()
Solution 2:
Add custom directive with HostListener implemented.Listen click event using directive
Use event emitter to call a function in parent component
Post a Comment for "Call Angular 2 Component Method From Html Event"