<ul nz-menu nzMode="inline" class="app-menu">
    <ng-container *ngFor="let item of menus">
        <li nz-submenu *ngIf="item.items && item.items.length > 0; else elseBlock">
            <span title>
                <i *ngIf="item.iconcls != ''" [class]="item.iconcls"></i>
                {{ item.text }}
            </span>
            <ul>
                <ng-container *ngFor="let item2 of item.items">
                    <li nz-submenu *ngIf="item2.items && item2.items.length > 0; else elseBlock2">
                        <span title>
                            <i *ngIf="item2.iconcls != ''" [class]="item2.iconcls"></i>
                            {{ item2.text }}
                        </span>
                        <ul>
                            <ng-container *ngFor="let item3 of item2.items">
                                <li nz-menu-item (click)="click(item3)">
                                    <i *ngIf="item3.iconcls != ''" [class]="item3.iconcls"></i>
                                    {{ item3.text }}
                                </li>
                            </ng-container>
                        </ul>
                    </li>
                    <ng-template #elseBlock2>
                        <li nz-menu-item (click)="click(item2)">
                            <i *ngIf="item2.iconcls != ''" [class]="item2.iconcls"></i>
                            {{ item2.text }}
                        </li>
                    </ng-template>
                </ng-container>
            </ul>
        </li>
        <ng-template #elseBlock>
            <li nz-menu-item (click)="click(item)">
                <i *ngIf="item.iconcls != ''" [class]="item.iconcls"></i>
                {{ item.text }}
            </li>
        </ng-template>
    </ng-container>
</ul>