Masum ULU
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
11 additions and
12 deletions
-
npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts
|
|
|
@ -33,18 +33,6 @@ export class DynamicLayoutComponent implements OnInit { |
|
|
|
protected readonly routerEvents = inject(RouterEvents); |
|
|
|
protected readonly environment = inject(EnvironmentService); |
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
if (this.layout) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const { oAuthConfig } = this.environment.getEnvironment() || {}; |
|
|
|
|
|
|
|
if (oAuthConfig.responseType && oAuthConfig.responseType === 'code') { |
|
|
|
this.getLayout(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
constructor(@Optional() @SkipSelf() dynamicLayoutComponent: DynamicLayoutComponent) { |
|
|
|
if (dynamicLayoutComponent) { |
|
|
|
if (isDevMode()) console.warn('DynamicLayoutComponent must be used only in AppComponent.'); |
|
|
|
@ -53,6 +41,17 @@ export class DynamicLayoutComponent implements OnInit { |
|
|
|
this.checkLayoutOnNavigationEnd(); |
|
|
|
this.listenToLanguageChange(); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
if (this.layout) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const { oAuthConfig } = this.environment.getEnvironment(); |
|
|
|
if (oAuthConfig.responseType === 'code') { |
|
|
|
this.getLayout(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private checkLayoutOnNavigationEnd() { |
|
|
|
const navigationEnd$ = this.routerEvents.getNavigationEvents('End'); |
|
|
|
|