I'm having an issue when trying to access a sub property of an array. Here's the snippet in question:
ngOnInit() {
this.menus = this.navService.defaultMenu;
console.log(this.getMenusItem());
this.registerChangeInProjects();
}
The code above is causing me some trouble and providing the following output:
https://i.sstatic.net/SKR70.jpg
I'm attempting to retrieve sub elements from the main array. Here's a preview of the view snippet:
<div class="module-buttons" *ngFor="let item of getMenusItem().sub">
<div *hasAnyAuthority="item.roles" class="btn-item" routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: true }">
<a
routerLink="{{ item.state }}">{{ 'khanbankCpmsApp.' + item.name + '.home.title' | translate }}</a>
</div>
</div>
Can someone help point out what mistake I might be making here?