Open
Description
When a task is created on a component, the task either uses the existing ngOnDestroy
method, or creates one on the component. The AOT compiler somehow prevents the latter from working.
This only affects components where both of the following are true:
- The component will ultimately be compiled using AOT. (
ng serve --aot
,ng build --prod
in Angular 5 and beyond, etc.) - The component does not define
ngOnDestroy
The workaround:
Define ngOnDestroy
on your component. Just an empty function will do:
class SomeComponent extends Component {
ngOnDestroy() {}
}
Metadata
Metadata
Assignees
Labels
No labels