-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10203 from abpframework/feat/10201
Create Breadcrumblist Component
- Loading branch information
Showing
5 changed files
with
38 additions
and
23 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...packages/theme-shared/src/lib/components/breadcrumb-items/breadcrumb-items.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
9 changes: 9 additions & 0 deletions
9
...s/packages/theme-shared/src/lib/components/breadcrumb-items/breadcrumb-items.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = []; | ||
} |
14 changes: 1 addition & 13 deletions
14
npm/ng-packs/packages/theme-shared/src/lib/components/breadcrumb/breadcrumb.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
<ol class="breadcrumb" *ngIf="segments.length"> | ||
<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> | ||
<abp-breadcrumb-items [items]="segments"></abp-breadcrumb-items> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters