fix(core): properly destroy embedded Views attatched to ApplicationRef (#13459)
Fixes #13062
This commit is contained in:

committed by
Victor Berchet

parent
94b7031fe9
commit
d40bbf4d5c
@ -191,7 +191,8 @@ export abstract class AppView<T> {
|
||||
} else {
|
||||
this._renderDetach();
|
||||
}
|
||||
if (this.declaredViewContainer && this.declaredViewContainer !== this.viewContainer) {
|
||||
if (this.declaredViewContainer && this.declaredViewContainer !== this.viewContainer &&
|
||||
this.declaredViewContainer.projectedViews) {
|
||||
const projectedViews = this.declaredViewContainer.projectedViews;
|
||||
const index = projectedViews.indexOf(this);
|
||||
// perf: pop is faster than splice!
|
||||
|
Reference in New Issue
Block a user