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

后端 未结 22 1943
谎友^
谎友^ 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 15:00

    I received the error because the component I was using wasn't registered in the declarations: [] section of the module.

    After adding the component the error went away. I would have hoped for something less obscure than this error message to indicate the real problem.

提交回复
热议问题