this code dynamically binds a nested loop in the sidebar
<ul class="nav metismenu" id="side-menu" *ngIf="concatMenulist?.length > 0">
<li *ngFor="let menu1 of concatMenulist"> <!--level 01-->
<a *ngIf="menu1?.SubMenu && menu1.SubMenu?.length > 0" href="#"> <span class="fa fa-book"></span> <span class="nav-label">{{menu1.DisplayText}}</span> <span class="fa arrow"></span> </a>
<a *ngIf="!menu1?.SubMenu || menu1.SubMenu?.length === 0" href="{{menu1.ActionUrl}}"><span class="fa fa-user"></span> <span class="nav-label">{{menu1.DisplayText}}</span></a>
<ul *ngIf="menu1?.SubMenu && menu1.SubMenu?.length > 0" class="nav nav-second-level collapse" >
<li *ngFor="let menu2 of menu1.SubMenu" > <!--level 02-->
<a *ngIf="menu2?.SubMenu && menu2.SubMenu?.length > 0" href="#"><span class="fa fa-book"> </span><span class="nav-label">{{menu2.DisplayText}}</span> <span class="fa arrow"></span> </a>
<a *ngIf="!menu2?.SubMenu || menu2.SubMenu?.length === 0" href="{{menu2.ActionUrl}}"><span class="fa fa-book"></span> <span class="nav-label">{{menu2.DisplayText}}</span></a>
<ul *ngIf="menu2?.SubMenu &&menu2.SubMenu?.length > 0" class="nav nav-third-level collapse" >
<li *ngFor="let menu3 of menu2.SubMenu"> <!--level 03-->
<a *ngIf="menu3?.SubMenu && menu3.SubMenu?.length > 0" href="#"> <span class="fa fa-book"></span><span class="nav-label">{{menu3.DisplayText}}</span><span class="fa arrow"></span></a>
<a *ngIf="!menu3?.SubMenu || menu3.SubMenu?.length === 0" href="{{menu3.ActionUrl}}"> <span class="fa fa-pencil"></span><span class="nav-label">{{menu3.DisplayText}}</span></a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
Everything was working fine with the expand/collapse CSS before adding the ngIf condition. But now, it seems to have stopped working. Can someone assist me with this issue?