Emit event from Directive to parent element

前端 未结 2 1017
情深已故
情深已故 2020-12-29 20:49

I have an element in HTML template of an Angular 2 app. I add a directive to it:

HELLO

I want that

2条回答
  •  梦谈多话
    2020-12-29 21:21

    If myCustomDirective has an output @Output() someEvent:EventEmitter = new EventEmitter(); then you can use

    HELLO

提交回复
热议问题