https://stackblitz.com/edit/n.
this is the example of the official website, and this example is the same.
didn"t have this bread crumb at the beginning. I want a bread crumb when it"s initialized, and it"s still there when it"s refreshed
which great god has written it? Thank you very much for the
code:
routing:
const routes: Routes = [
{
path: "",
component: AboutComponent,
data: {
breadcrumb: ""
},
children: [
{
path: "companyinstroduction",
component: CompanyinstroductionComponent,
data: {
breadcrumb: ""
}
}
]
}
]
html:
<ul>
<li nz-menu-item *ngFor="let item1 of item.menulist">
<a [routerLink]="item1.href" routerLinkActive="active">
{{item1.name}}
</a>
</li>
</ul>
<nz-content>
<div class="bread">
<nz-breadcrumb [nzAutoGenerate]="true" [nzSeparator]="iconTemplate"></nz-breadcrumb>
<nz-divider></nz-divider>
</div>
<div style="padding:24px; background: -sharpfff; min-height: 360px;">
<router-outlet></router-outlet>
</div>
</nz-content>
enter the display page:
the first option is displayed by default