Skip to content

Commit

Permalink
fix(app-header): backward compatible inputs
Browse files Browse the repository at this point in the history
- keep deprecated `navbarBrandHref `
- use `navbarBrandRouterLink` instead
  • Loading branch information
xidedix committed Feb 19, 2019
1 parent 847db24 commit 68343ee
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class AppHeaderComponent implements OnInit, OnDestroy {
@Input() navbarBrandFull: any;
@Input() navbarBrandMinimized: any;
@Input() navbarBrandText: any = {icon: '🅲', text: '🅲 CoreUI'};
@Input() navbarBrandHref: string = ''; // deprecated, use navbarBrandRouterLink instead
@Input() navbarBrandRouterLink: any[] | string = '';

@Input() sidebarToggler: string | boolean;
Expand All @@ -36,6 +37,7 @@ export class AppHeaderComponent implements OnInit, OnDestroy {
ngOnInit(): void {
this.isFixed(this.fixed);
this.navbarBrandImg = Boolean(this.navbarBrand || this.navbarBrandFull || this.navbarBrandMinimized);
this.navbarBrandRouterLink = this.navbarBrandRouterLink[0] ? this.navbarBrandRouterLink : this.navbarBrandHref;
}

ngOnDestroy(): void {
Expand Down

0 comments on commit 68343ee

Please sign in to comment.