mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-08 19:45:08 +00:00
(fuse/navigation) Added "target" for setting the target attribute on outgoing links. Thanks @danielehrhardt for the original PR, closes #154
This commit is contained in:
parent
efdfa6418a
commit
ff086b1ed0
|
@ -19,7 +19,8 @@
|
||||||
<a
|
<a
|
||||||
class="fuse-horizontal-navigation-item"
|
class="fuse-horizontal-navigation-item"
|
||||||
*ngIf="item.link && item.externalLink && !item.function && !item.disabled"
|
*ngIf="item.link && item.externalLink && !item.function && !item.disabled"
|
||||||
[href]="item.link">
|
[href]="item.link"
|
||||||
|
[target]="item.target || '_self'">
|
||||||
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
class="fuse-horizontal-navigation-item"
|
class="fuse-horizontal-navigation-item"
|
||||||
*ngIf="item.link && item.externalLink && item.function && !item.disabled"
|
*ngIf="item.link && item.externalLink && item.function && !item.disabled"
|
||||||
[href]="item.link"
|
[href]="item.link"
|
||||||
|
[target]="item.target || '_self'"
|
||||||
(click)="item.function(item)"
|
(click)="item.function(item)"
|
||||||
mat-menu-item>
|
mat-menu-item>
|
||||||
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
||||||
|
|
|
@ -17,6 +17,12 @@ export interface FuseNavigationItem
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
link?: string;
|
link?: string;
|
||||||
externalLink?: boolean;
|
externalLink?: boolean;
|
||||||
|
target?:
|
||||||
|
| '_blank'
|
||||||
|
| '_self'
|
||||||
|
| '_parent'
|
||||||
|
| '_top'
|
||||||
|
| string;
|
||||||
exactMatch?: boolean;
|
exactMatch?: boolean;
|
||||||
isActiveMatchOptions?: IsActiveMatchOptions;
|
isActiveMatchOptions?: IsActiveMatchOptions;
|
||||||
function?: (item: FuseNavigationItem) => void;
|
function?: (item: FuseNavigationItem) => void;
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
<a
|
<a
|
||||||
class="fuse-vertical-navigation-item"
|
class="fuse-vertical-navigation-item"
|
||||||
*ngIf="item.link && item.externalLink && !item.function && !item.disabled"
|
*ngIf="item.link && item.externalLink && !item.function && !item.disabled"
|
||||||
[href]="item.link">
|
[href]="item.link"
|
||||||
|
[target]="item.target || '_self'">
|
||||||
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
class="fuse-vertical-navigation-item"
|
class="fuse-vertical-navigation-item"
|
||||||
*ngIf="item.link && item.externalLink && item.function && !item.disabled"
|
*ngIf="item.link && item.externalLink && item.function && !item.disabled"
|
||||||
[href]="item.link"
|
[href]="item.link"
|
||||||
|
[target]="item.target || '_self'"
|
||||||
(click)="item.function(item)">
|
(click)="item.function(item)">
|
||||||
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
<ng-container *ngTemplateOutlet="itemTemplate"></ng-container>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user