Angular2 component: impossible to emit an @Output EventEmitter inside ngOnDestroy?

后端 未结 2 1420
面向向阳花
面向向阳花 2021-01-27 02:19

[angular2 rc1]

Is it possible to have a component like this:

export class MyComp {
  @Output() myEvent = new EventEmitter(false)

  ngOnDestroy() {
    t         


        
2条回答
  •  无人共我
    2021-01-27 02:44

    This PR should fix this problem. It changes the behavior that ngOnDestroy() is called before the events are detached.

    https://github.com/angular/angular/pull/9946

提交回复
热议问题