Browse Source

refactor: clear sub first on destroy for page-part

pull/8274/head
bnymncoskuner 6 years ago
parent
commit
218e3c1b3e
  1. 4
      npm/ng-packs/packages/components/page/src/page-part.directive.ts

4
npm/ng-packs/packages/components/page/src/page-part.directive.ts

@ -66,11 +66,11 @@ export class PagePartDirective implements OnInit, OnDestroy, OnChanges {
} }
ngOnDestroy() { ngOnDestroy() {
this.clearSubscription();
if (this.renderLogic?.onDestroy) { if (this.renderLogic?.onDestroy) {
this.renderLogic.onDestroy(this.type, this.injector, this.context); this.renderLogic.onDestroy(this.type, this.injector, this.context);
} }
this.clearSubscription();
} }
shouldRender(type: string) { shouldRender(type: string) {

Loading…
Cancel
Save