What is the meaning of * in *ngFor in angular2?

前端 未结 5 2044
-上瘾入骨i
-上瘾入骨i 2021-01-01 09:20

What is the meaning of * before ngFor in following sample and why it is needed?

{{hero.
5条回答
  •  走了就别回头了
    2021-01-01 10:02

    In *ngFor the * is a shorthand for using the new angular template syntax with a template tag, this is also called structural Directive.It is helpful to know that * is just a shorthand to explicitly defining the data bindings on a template tag.

提交回复
热议问题