-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Omnia Kahla
authored and
Omnia Kahla
committed
Sep 28, 2020
1 parent
7df07dc
commit c82e673
Showing
13 changed files
with
777 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/app/app-engine/page/menu-item/menu-item.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<mat-menu #childMenu="matMenu" [overlapTrigger]="false"> | ||
<span *ngFor="let child of items"> | ||
<!-- Handle branch node menu items --> | ||
<span *ngIf="child.subPages && child.subPages.length > 0"> | ||
<button mat-menu-item color="primary" [matMenuTriggerFor]="menu.childMenu"> | ||
<span>{{child.page.title}}</span> | ||
</button> | ||
<app-menu-item #menu [items]="child.subPages"></app-menu-item> | ||
</span> | ||
<!-- Handle leaf node menu items --> | ||
<span *ngIf="(!child.subPages || child.subPages.length === 0) && child.page"> | ||
<button mat-menu-item> | ||
<span>{{child.page.title}}</span> | ||
</button> | ||
</span> | ||
</span> | ||
</mat-menu> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {Component, Input, OnInit, ViewChild} from '@angular/core'; | ||
import {Router} from '@angular/router'; | ||
import {SubPageOfPageModel} from '../../../user-action-engine/mongodb/page/subPageOfPage.model'; | ||
|
||
@Component({ | ||
selector: 'app-menu-item', | ||
templateUrl: './menu-item.component.html', | ||
styleUrls: ['./menu-item.component.scss'] | ||
}) | ||
export class MenuItemComponent implements OnInit { | ||
@Input() items: SubPageOfPageModel[]; | ||
@ViewChild('childMenu') public childMenu; | ||
|
||
constructor(public router: Router) { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
} |
Oops, something went wrong.