We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
am having issues working with the nested-menu and nested classes while trying to generate dynamic menu using ngFor & ngIf.
Similar sidenav with Material example is available here
Model Class export interface NavItems { displayName: string; disabled?: boolean; iconName: string; route?: string; children?: NavItems[]; } <!-- Component.html --> <span *ngFor="let item of navItems"> <span *ngIf="item.children && item.children.length > 0"> <div style="background-color:darkcyan">{{item.displayName}}</div> <app-menu-item #menu [items]="item.children"></app-menu-item> </span> <span *ngIf="!item.children || item.children.length === 0"> <div style="background-color:crimson">{{item.displayName}}</div> </span> </span> <!-- app-menu-item (for iteration) --> <span *ngFor="let item of items"> <span *ngIf="item.children && item.children.length > 0"> <div style="background-color: darkorchid">{{item.displayName}}</div> <app-menu-item #menu [items]="item.children"></app-menu-item> </span> <span *ngIf="!item.children || item.children.length === 0"> <div style="background-color:chartreuse">{{item.displayName}}</div> </span> </span>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
am having issues working with the nested-menu and nested classes while trying to generate dynamic menu using ngFor & ngIf.
Similar sidenav with Material example is available here
The text was updated successfully, but these errors were encountered: