Ich habe eine sidenav Bar mit einigen RegisterkartenWie wird die Bootstrap-Navigationsleiste eingestellt, die im Angular 2 RouterModule als "aktive" Klasse ausgewählt wurde?
<div class="side-wrap-div">
<div class="list-group sidebar-nav">
<li class="list-group-item borderBottomMenu active" >
<a href="#/{{ DocumentURL }}">Document</a>
<span class="marker-logo"></span>
<span class="logo document-logo-click" ></span>
</li>
</div>
<div class="list-group bottom-fixed">
<div id="collapse3" *ngIf="showContact">
<a href="#/contact/{{ currentTaskId }}" class="panel-collapse list-group-item collapse">
<span class="logo contact-logo" ></span>Contact
</a>
</div>
<div>
Wie die navbar einstellen ausgewählt, aktiv zu sein? Ich benutze RouterModule (nicht [routerLink]) und habe mein Routing in app.routing.ts deklariert.
Versuchen Sie [routerLinkActive] = "[ 'aktiv']" – Habeeb
@Habeeb In meinem Fall, wo mache ich das sagen? Mit ? – Protagonist
@Habeeb Ich habe versucht, aber das Problem ist, es wird als hervorgehoben oder ausgewählt – Protagonist