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

后端 未结 22 1998
谎友^
谎友^ 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:55

    Even I faced the same issue, i tried all the answers over here, but a simple change helped me to resolve this issue, instead of including *ngFor in tr tag , I included it in tbody tag. Hope it helps someone.

    
            
                {{product.id}}
                {{product.name}}
                {{product.description}}
                {{product.quantity}}
                
                    
                    
                
            
        
    

提交回复
热议问题