mirror of https://github.com/abpframework/abp.git
committed by
GitHub
5 changed files with 38 additions and 23 deletions
@ -0,0 +1,23 @@ |
|||||
|
<ol class="breadcrumb" *ngIf="items.length"> |
||||
|
<li class="breadcrumb-item"> |
||||
|
<a routerLink="/"><i class="fa fa-home"></i> </a> |
||||
|
</li> |
||||
|
<li |
||||
|
*ngFor="let item of items; let last = last" |
||||
|
class="breadcrumb-item" |
||||
|
[class.active]="last" |
||||
|
aria-current="page" |
||||
|
> |
||||
|
<ng-container |
||||
|
*ngTemplateOutlet="item.path ? linkTemplate : textTemplate; context: { $implicit: item }" |
||||
|
></ng-container> |
||||
|
</li> |
||||
|
</ol> |
||||
|
|
||||
|
<ng-template #linkTemplate let-item> |
||||
|
<a [routerLink]="item.path"> {{ item.name | abpLocalization }}</a> |
||||
|
</ng-template> |
||||
|
|
||||
|
<ng-template #textTemplate let-item> |
||||
|
{{ item.name | abpLocalization }} |
||||
|
</ng-template> |
||||
@ -0,0 +1,9 @@ |
|||||
|
import { Component, Input } from '@angular/core'; |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'abp-breadcrumb-items', |
||||
|
templateUrl: './breadcrumb-items.component.html', |
||||
|
}) |
||||
|
export class BreadcrumbItemsComponent { |
||||
|
@Input() items = []; |
||||
|
} |
||||
@ -1,13 +1 @@ |
|||||
<ol class="breadcrumb" *ngIf="segments.length"> |
<abp-breadcrumb-items [items]="segments"></abp-breadcrumb-items> |
||||
<li class="breadcrumb-item"> |
|
||||
<a routerLink="/"><i class="fa fa-home"></i> </a> |
|
||||
</li> |
|
||||
<li |
|
||||
*ngFor="let segment of segments; let last = last" |
|
||||
class="breadcrumb-item" |
|
||||
[class.active]="last" |
|
||||
aria-current="page" |
|
||||
> |
|
||||
{{ segment.name | abpLocalization }} |
|
||||
</li> |
|
||||
</ol> |
|
||||
|
|||||
Loading…
Reference in new issue