Browse Source

style: replace isLayoutShow with isLayoutVisible

pull/4663/head
Levent Arman Özak 6 years ago
committed by GitHub
parent
commit
caa822ed6f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts

8
npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts

@ -17,14 +17,14 @@ import { TreeNode } from '../utils/tree-utils';
<ng-container *ngTemplateOutlet="layout ? componentOutlet : routerOutlet"></ng-container> <ng-container *ngTemplateOutlet="layout ? componentOutlet : routerOutlet"></ng-container>
<ng-template #routerOutlet><router-outlet></router-outlet></ng-template> <ng-template #routerOutlet><router-outlet></router-outlet></ng-template>
<ng-template #componentOutlet <ng-template #componentOutlet
><ng-container *ngIf="isLayoutShow" [ngComponentOutlet]="layout"></ng-container ><ng-container *ngIf="isLayoutVisible" [ngComponentOutlet]="layout"></ng-container
></ng-template> ></ng-template>
`, `,
}) })
export class DynamicLayoutComponent implements OnDestroy { export class DynamicLayoutComponent implements OnDestroy {
layout: Type<any>; layout: Type<any>;
isLayoutShow = true; isLayoutVisible = true;
constructor( constructor(
injector: Injector, injector: Injector,
@ -71,8 +71,8 @@ export class DynamicLayoutComponent implements OnDestroy {
private listenToLanguageChange() { private listenToLanguageChange() {
this.localizationService.languageChange.pipe(takeUntilDestroy(this)).subscribe(() => { this.localizationService.languageChange.pipe(takeUntilDestroy(this)).subscribe(() => {
this.isLayoutShow = false; this.isLayoutVisible = false;
setTimeout(() => (this.isLayoutShow = true), 0); setTimeout(() => (this.isLayoutVisible = true), 0);
}); });
} }

Loading…
Cancel
Save