File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 99 < button class ="back-button " *ngIf ="hasBackButton ">
1010 < mat-icon (click) ="goToPreviousPage() " color ="primary "> arrow_back</ mat-icon >
1111 </ button >
12- < h2 class ="title ">
13- {{ title }}
14- </ h2 >
12+ < ng-container *ngIf ="titleTemplate; else textTitle ">
13+ < ng-container *ngTemplateOutlet ="titleTemplate "> </ ng-container >
14+ </ ng-container >
15+
16+ < ng-template #textTitle >
17+ < h2 class ="title "> {{ title }}</ h2 >
18+ </ ng-template >
1519 </ div >
1620 < ng-template [cdkPortalOutlet] ="actionGroupPortal "> </ ng-template >
1721 </ div >
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { Router, RouterModule } from '@angular/router';
1414export class SidebarLayoutComponent {
1515 @Input ( ) title : string = '' ;
1616 @Input ( ) hasBackButton = true ;
17+ @Input ( ) titleTemplate : TemplateRef < unknown > | null ;
1718
1819 @Input ( { required : true } ) set sideBarItems ( ref : TemplateRef < unknown > ) {
1920 this . sideBarItemsPortal = new TemplatePortal ( ref , this . _viewContainerRef ) ;
You can’t perform that action at this time.
0 commit comments