I am using ngFor to iterate a collection of a specific type [Menu] in Angular 4.x
Then looping on a collection property of the menu object [menu.items]
Unfortunately the property is unknown in my IDE [Eclipse + Angular IDE] even though the Menu class defines the items property as an array of MenuItem.
Any thoughts?
Relevant class declarations -
export class MenuBase {
id: string;
title: string;
isPublic: boolean;
roles: string[];
items: MenuItem[];
position: number;
// rest of class omitted
}
export class MenuItem extends MenuBase {
menuItemType: MenuItemType;
callback: () => void;
location: string;
constructor (options: any) {
super(options);
this.location = options.location;
this.menuItemType = options.menuItemType || MenuItemType.location;
this.callback = options.callback;
}
}
export class Menu extends MenuBase {
constructor (options: any) {
super(options);
}
}
Additional info -
This is the project I was working on:
https://github.com/savantly-net/ngx-menu
The project will show an error in Eclipse, even though it's valid.
I never created any documentation, but I used it here -
https://github.com/savantly-net/sprout-platform/tree/master/web/sprout-web-ui
