Skip to content

Commit 7857b92

Browse files
tinayuangaojosephperrott
authored andcommitted
fix(tree): fix nested node is not working (#10635)
1 parent 5b7a6a3 commit 7857b92

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/lib/tree/node.ts

+11
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,15 @@ export class MatNestedTreeNode<T> extends _MatNestedTreeNodeMixinBase<T>
101101

102102
this.tabIndex = Number(tabIndex) || 0;
103103
}
104+
105+
// This is a workaround for https://github.com/angular/angular/issues/23091
106+
// In aot mode, the lifecycle hooks from parent class are not called.
107+
// TODO(tinayuangao): Remove when the angular issue #23091 is fixed
108+
ngAfterContentInit() {
109+
super.ngAfterContentInit();
110+
}
111+
112+
ngOnDestroy() {
113+
super.ngOnDestroy();
114+
}
104115
}

0 commit comments

Comments
 (0)