Angular 2 Can't bind to 'ngif' since it isn't a known property [duplicate]
You have a typo. Use ngIf
instead of ngif
Correct way to use it:
<table class='table' *ngIf="products && products.length">
UPDATE:
Many people (including me) got this issue, because IntelliJ IDEA/WebStorm autocompletion gives invalid ngif
. Additionally, IDEA highlights *ngIf
as invalid.
Recently I upgraded my IDEA to 2017.2.5 together with JS/Angular plugins and this problem is gone. Also, I got better NG2+ autocompletion and better TypeScript support. This is why I highly recommend upgrading JetBrains software.
you have an error because of "*ngif" correct one is "*ngIf". The capital 'I' here and the capital 'F' in *ngFor..I used to mistype a lot of times. Just be a little patient. :)