Browse Source
Merge pull request #23856 from abpframework/fix/23795
Angular - Template layout breaks when APP_ROUTE_PROVIDER is removed from providers
pull/23857/head
sumeyye
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
12 additions and
2 deletions
-
npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts
|
|
|
@ -1,4 +1,13 @@ |
|
|
|
import { Component, inject, isDevMode, OnInit, Optional, SkipSelf, Type } from '@angular/core'; |
|
|
|
import { |
|
|
|
Component, |
|
|
|
inject, |
|
|
|
input, |
|
|
|
isDevMode, |
|
|
|
OnInit, |
|
|
|
Optional, |
|
|
|
SkipSelf, |
|
|
|
Type, |
|
|
|
} from '@angular/core'; |
|
|
|
import { ActivatedRoute, Router } from '@angular/router'; |
|
|
|
import { eLayoutType } from '../enums/common'; |
|
|
|
import { ABP } from '../models'; |
|
|
|
@ -29,6 +38,7 @@ export class DynamicLayoutComponent implements OnInit { |
|
|
|
layoutKey?: eLayoutType; |
|
|
|
readonly layouts = inject(DYNAMIC_LAYOUTS_TOKEN); |
|
|
|
isLayoutVisible = true; |
|
|
|
readonly defaultLayout = input<eLayoutType>(undefined); |
|
|
|
|
|
|
|
protected readonly router = inject(Router); |
|
|
|
protected readonly route = inject(ActivatedRoute); |
|
|
|
@ -96,7 +106,7 @@ export class DynamicLayoutComponent implements OnInit { |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return expectedLayout; |
|
|
|
return expectedLayout ?? this.defaultLayout(); |
|
|
|
} |
|
|
|
|
|
|
|
showLayoutNotFoundError(layoutName: string) { |
|
|
|
|