Correct use of Elvis operator in Angular2 for Dart component's view

前端 未结 4 1321
闹比i
闹比i 2020-12-31 05:35

I see in Angular2 Dart Angular for Dart Cheat Sheet (v2.0.0-beta.2) that the Elvis operator is supported.

I am trying to use it in an a components view but it seems

4条回答
  •  轮回少年
    2020-12-31 05:59

    Go to your component.ts class and initialize the model's properties to "" or whatever the appropriate default value should be.

    A good place would be ngOnInit() method.

    This helped me on Angular 5.

提交回复
热议问题