Browse Source

feat: check dynamic layout other instance

pull/4423/head
mehmet-erim 6 years ago
parent
commit
c0896e6806
  1. 5
      npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts

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

@ -1,4 +1,4 @@
import { Component, Injector, OnDestroy, Type } from '@angular/core';
import { Component, Injector, OnDestroy, Type, Optional, SkipSelf } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { Store } from '@ngxs/store';
import { eLayoutType } from '../enums/common';
@ -28,7 +28,10 @@ export class DynamicLayoutComponent implements OnDestroy {
private route: ActivatedRoute,
private routes: RoutesService,
private store: Store,
@Optional() @SkipSelf() dynamicLayoutComponent: DynamicLayoutComponent,
) {
if (dynamicLayoutComponent) return;
const router = injector.get(Router);
const layouts = {
application: this.getComponent('Theme.ApplicationLayoutComponent'),

Loading…
Cancel
Save