Answer the question
In order to leave comments, you need to log in
Routing in Angular 2+ app?
<div *ngFor="let p of points"
class="list-of-menu-container pointer menu-line"
(click)="currentItem = p"
[class.full-opacity]="p.route === currentItem?.route"
>
<div class="icon-wrap">
<i class="fa icon gray-icon" [ngClass]="[p.icon]"></i>
</div>
<div [ngClass]="{'hidden': !(fixedMenu || hoveredMenu), 'visible': !!(fixedMenu || hoveredMenu)}" class="main-text">
<a [routerLink]="[p.route]">{{ p.label }}</a>
</div>
<div class="subbmenu" *ngIf="p.childs?.length">
<div class="subbmenu__wrapper" *ngFor="let item of p.childs">
<div class="subbmenu__icon">
<i class="fa icon gray-icon" [ngClass]="[item.icon]"></i>
</div>
<a [routerLink]="[p.route + '/' + item.route]">{{item.label}}</a>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
It's hard to say that without knowing what you have in the routes and what happens in the component. must be dragged to stackblitz
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question