-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:breadcrumb): support auto generated breadcrumb (#2050)
close #2001
- Loading branch information
Wendell
authored and
Jason
committed
Sep 7, 2018
1 parent
2858ba1
commit 64d191c
Showing
8 changed files
with
271 additions
and
5 deletions.
There are no files selected for viewing
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,18 @@ | ||
--- | ||
order: 4 | ||
|
||
iframe: | ||
source: https://stackblitz.com/edit/ng-zorro-breadcrumb-auto?embed=1&file=src/app/app.component.html&hideExplorer=1&hideNavigation=1&view=preview | ||
height: 460 | ||
title: | ||
zh-CN: 自动生成 | ||
en-US: Auto generated breadcrumbs | ||
--- | ||
|
||
## zh-CN | ||
|
||
通过配置 `router.data` 自动生成面包屑。 | ||
|
||
## en-US | ||
|
||
Auto generate breadcrumbs using `router.data`. |
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,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-breadcrumb-auto', | ||
template: ` | ||
<nz-breadcrumb [nzAutoGenerate]="true"> | ||
Please refer to StackBlitz demo. | ||
</nz-breadcrumb> | ||
` | ||
}) | ||
export class NzDemoBreadcrumbAutoComponent {} |
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
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 +1,6 @@ | ||
<ng-content></ng-content> | ||
<ng-content></ng-content> | ||
<ng-container *ngIf="nzAutoGenerate"> | ||
<nz-breadcrumb-item *ngFor="let breadcrumb of breadcrumbs"> | ||
<a [attr.href]="breadcrumb.url">{{ breadcrumb.label }}</a> | ||
</nz-breadcrumb-item> | ||
</ng-container> |
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
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