Skip to content

Commit 8350822

Browse files
authored
Merge pull request #23857 from abpframework/auto-merge/rel-9-3/4009
Merge branch rel-10.0 with rel-9.3
2 parents ff1f3c7 + 1cfb1d0 commit 8350822

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
import { Component, inject, isDevMode, Type } from '@angular/core';
1+
import {
2+
Component,
3+
inject,
4+
input,
5+
isDevMode,
6+
OnInit,
7+
Optional,
8+
SkipSelf,
9+
Type,
10+
} from '@angular/core';
211
import { ActivatedRoute, Router } from '@angular/router';
312
import { eLayoutType } from '../enums/common';
413
import { ABP } from '../models';
@@ -30,6 +39,7 @@ export class DynamicLayoutComponent {
3039
layoutKey?: eLayoutType;
3140
readonly layouts = inject(DYNAMIC_LAYOUTS_TOKEN);
3241
isLayoutVisible = true;
42+
readonly defaultLayout = input<eLayoutType>(undefined);
3343

3444
protected readonly router = inject(Router);
3545
protected readonly route = inject(ActivatedRoute);
@@ -89,7 +99,7 @@ export class DynamicLayoutComponent {
8999
break;
90100
}
91101
}
92-
return expectedLayout;
102+
return expectedLayout ?? this.defaultLayout();
93103
}
94104

95105
showLayoutNotFoundError(layoutName: string) {

0 commit comments

Comments
 (0)