Skip to content

Commit abd57c1

Browse files
committed
fix(template-outlet): Revert changes in template-outlet
1 parent 9154694 commit abd57c1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

projects/igniteui-angular/src/lib/directives/template-outlet/template_outlet.directive.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
Directive, EmbeddedViewRef, Input, OnChanges, ChangeDetectorRef,
3-
SimpleChange, SimpleChanges, TemplateRef, ViewContainerRef, NgZone, Output, EventEmitter,
4-
OnDestroy,
3+
SimpleChange, SimpleChanges, TemplateRef, ViewContainerRef, NgZone, Output, EventEmitter
54
} from '@angular/core';
65

76
import { IBaseEventArgs } from '../../core/utils';
@@ -13,7 +12,7 @@ import { IBaseEventArgs } from '../../core/utils';
1312
selector: '[igxTemplateOutlet]',
1413
standalone: true
1514
})
16-
export class IgxTemplateOutletDirective implements OnChanges, OnDestroy {
15+
export class IgxTemplateOutletDirective implements OnChanges {
1716
@Input() public igxTemplateOutletContext !: any;
1817

1918
@Input() public igxTemplateOutlet !: TemplateRef<any>;
@@ -52,11 +51,6 @@ export class IgxTemplateOutletDirective implements OnChanges, OnDestroy {
5251
}
5352
}
5453

55-
public ngOnDestroy(): void {
56-
// Detached views won't be destroyed automatically by Angular.
57-
this.cleanCache();
58-
}
59-
6054
public cleanCache() {
6155
this._embeddedViewsMap.forEach((collection) => {
6256
collection.forEach((item => {

0 commit comments

Comments
 (0)