1
What’s the difference between ng-if and *ngIf in Angular 5? The two implementations work normally at Angular 5?
1
What’s the difference between ng-if and *ngIf in Angular 5? The two implementations work normally at Angular 5?
4
The ng-if was used in Angularjs
The *ngIf is used in Angular (version 2.x or higher)
Browser other questions tagged angular
You are not signed in. Login or sign up in order to post.
With *ngif you can have an Else, with ng-if no, but there may be other things I don’t know different between those two so I will comment and not reply.
– PauloHDSousa
Related: https://answall.com/q/277782/57801
– Don't Panic
ngIf=""
is directive,*ngIf=""
structural directive; it is necessary to use the*
when used in template a markup indicating thatngIf=""
will result in a change in the structurehtml
, has a full answer on the stack in English: https://stackoverflow.com/questions/38271949/what-is-the-difference-between-ng-if-and-ng-if-in-angular2– Hebert Lima