Upon launching the app, both Main Menu and Menu One should be visible right away.
I'm struggling to simplify my code in order to implement this feature efficiently.
https://stackblitz.com/edit/angular-3q8e8q
data = SideMenu.data.subOptions[0].children;
// selected: number;
selected: number = 0;
constructor() { }
ngOnInit() {
}
showSubMenu(item: {}, i: number) {
console.log(item['children']);
this.selected = i;
this.changeMainMenu.emit(item['children']);
}
The goal is to display Main Menu and Sub Menu One upon initialization.
Sub Menu Two should not be visible at this time.