Does angular2 have ngCloak

后端 未结 3 391
名媛妹妹
名媛妹妹 2021-01-03 23:32

AngularJS 1.x has ngCloak directive, which is used to prevent the Angular html template from being briefly displayed by the browser in its raw (uncompiled) form.

Doe

3条回答
  •  無奈伤痛
    2021-01-04 00:09

    Angular2 desn' have ngCloak,

    instead you can use ?. operator (use it with object).

    {{user?.name}}
    

    AND/OR

    you can use *ngIf (as of now)

    {{name}}

提交回复
热议问题