In angular 2 document, * and template, we know that the *ngIf, *ngSwitch, *ngFor can be expanded to ng-template tag. My question is:
I think the ngIf
or
Angular treats template elements in a special way. The *
syntax is a shortcut that lets you void writing the whole element. Let me show you how it works.
using this
*ngFor="let t of todos; let i=index"
de-sugars it into
template="ngFor: let t of todos; let i=index"
which de-sugars into
also angular's Structural directives like ngFor, ngIf etc prefixed by *
just to differentiate from this custom directives and components
see more here
https://vsavkin.com/angular-2-template-syntax-5f2ee9f13c6a#.rcffirs7a