@@ -10,8 +10,8 @@ import { Replace } from './../shared';
1010 <span class="navbar-toggler-icon"></span>
1111 </button>
1212 </ng-template>
13- <ng-template [ngIf ]="navbarBrand || navbarBrandFull || navbarBrandMinimized ">
14- <a class="navbar-brand" href="# ">
13+ <a class="navbar-brand" [href ]="navbarBrandHref ">
14+ <ng-template [ngIf]="navbarBrandImg ">
1515 <img *ngIf="navbarBrand"
1616 [src]="imgSrc(navbarBrand)"
1717 [attr.width]="imgWidth(navbarBrand)"
@@ -30,8 +30,12 @@ import { Replace } from './../shared';
3030 [attr.height]="imgHeight(navbarBrandMinimized)"
3131 [attr.alt]="imgAlt(navbarBrandMinimized)"
3232 class="navbar-brand-minimized">
33+ </ng-template>
34+ <ng-template [ngIf]="!navbarBrandImg">
35+ <div class="navbar-brand-full" [innerHTML]="navbarBrandText.text"></div>
36+ <div class="navbar-brand-minimized" [innerHTML]="navbarBrandText.icon"></div>
37+ </ng-template>
3338 </a>
34- </ng-template>
3539 <ng-template [ngIf]="sidebarToggler != false">
3640 <button class="navbar-toggler d-md-down-none" type="button" [appSidebarToggler]="sidebarToggler">
3741 <span class="navbar-toggler-icon"></span>
@@ -58,18 +62,23 @@ export class AppHeaderComponent implements OnInit, OnDestroy {
5862 @Input ( ) navbarBrand : any ;
5963 @Input ( ) navbarBrandFull : any ;
6064 @Input ( ) navbarBrandMinimized : any ;
65+ @Input ( ) navbarBrandText : any = { icon : '🅲' , text : '🅲 CoreUI' } ;
66+ @Input ( ) navbarBrandHref : any = '' ;
6167
6268 @Input ( ) sidebarToggler : any ;
6369 @Input ( ) mobileSidebarToggler : any ;
6470
6571 @Input ( ) asideMenuToggler : any ;
6672 @Input ( ) mobileAsideMenuToggler : any ;
6773
74+ navbarBrandImg : boolean ;
75+
6876 constructor ( private el : ElementRef ) { }
6977
7078 ngOnInit ( ) : void {
7179 Replace ( this . el ) ;
7280 this . isFixed ( this . fixed ) ;
81+ this . navbarBrandImg = Boolean ( this . navbarBrand || this . navbarBrandFull || this . navbarBrandMinimized ) ;
7382 }
7483
7584 ngOnDestroy ( ) : void {
0 commit comments