Can't bind to 'ngForOf' since it isn't a known property of 'tr' (final release)

后端 未结 22 1944
谎友^
谎友^ 2020-11-27 14:37

I\'m using Angular2 Final release (2.1.0). When I want to display a list of companies, I got this error.

in file.component.ts :

public          


        
22条回答
  •  情深已故
    2020-11-27 14:57

    I have encountered a similar error (*ngIf) even if all my imports were OK and the component was rendered without any other error + routing was OK.

    In my case AppModule was not including that specific module. The strange thing is that it did not complain about this, but this might be related with how Ivy works with ng serve (kind of loads modules according to routing, but its dependencies are not considered).

提交回复
热议问题