diff --git a/src/lib/tree/node.ts b/src/lib/tree/node.ts index 0376f410c36..f5523820d48 100644 --- a/src/lib/tree/node.ts +++ b/src/lib/tree/node.ts @@ -101,4 +101,15 @@ export class MatNestedTreeNode extends _MatNestedTreeNodeMixinBase this.tabIndex = Number(tabIndex) || 0; } + + // This is a workaround for https://github.com/angular/angular/issues/23091 + // In aot mode, the lifecycle hooks from parent class are not called. + // TODO(tinayuangao): Remove when the angular issue #23091 is fixed + ngAfterContentInit() { + super.ngAfterContentInit(); + } + + ngOnDestroy() { + super.ngOnDestroy(); + } }