问题
I use angular2
recently, but don't know how to implement breadcrumb
component, any one can help?
<div class="row" style="padding-top:15px;">
<ol class="breadcrumb">
<li><a [how to?]>home</a></li>
<li class="active">detail</li>
</ol>
</div>
回答1:
Doesn't seem to be too easy currently.
There is an open issue to support this use-case https://github.com/angular/angular/issues/5318
回答2:
well me too want to use Breadcrumb
for my project and after searching alot found Nothing about Breadcrumb
, so have decided
to create my own. so by using bootflat styling (http://bootflat.github.io/documentation.html) i have created my own Breadcrumb
for angular2 project. This Breadcrumb also support Routing in angular2. you just have to use these predefined components
given here in the repo.
https://github.com/MrPardeep/Angular2-DatePicker
here is the code for using Breadcrum in HTML file:
<breadcrumb>
<tab name="Home" icon="glyphicon glyphicon-home"></tab>
<a [routerLink]="['/Components']">
<tab name="Cutom Angular 2 Components" icon="glyphicon glyphicon-home"></tab>
</a>
<tab action="active" name="Datepicker" icon="glyphicon glyphicon-list-alt"></tab>
</breadcrumb>
hope this may help you and will useful for others too.
here is Demo for the Breadcrumb.
来源:https://stackoverflow.com/questions/35570624/how-to-implement-breadcrumb-using-angular2s-router