Modules through added components

35 views
Skip to first unread message

Esben Dalgaard

unread,
Dec 9, 2020, 4:37:15 AM12/9/20
to Angular and AngularJS discussion
Version 10.2.1
ABP framework

Hi, I'm adding a component to my navbar through ABP's NavItemsService. The component works fine as such, but gives me the 
"Can't bind to 'ngForOf' since it isn't a known property of 'div'."
error, when I try to use *ngFor in it. I've ensured my syntax should be correct, and that data from the component is visible, but I'm just not sure if I either:
A: Have configured my .module file correct, or
B: The component doesn't initialize the module, as it is loaded through the NavItemsService.

Capture1.PNGCapture2.PNGCapture3.PNG

The reason for this is because I want to make a dropdown with a list that is the length of whatever data I receive from a Db, with expandable and more.

Arnaud Deman

unread,
Dec 9, 2020, 9:56:41 AM12/9/20
to Angular and AngularJS discussion
Hi,
The CommonModule - which could cause this error if missing - is imported in your SelectModule but there is no exports section,  so I wonder how is imported the SelectComponent in the AppModule ?
I think the SelectComponent should be exported in SelectModule which should be imported itself in the AppModule.

Regards,
Arnaud.
Reply all
Reply to author
Forward
0 new messages