Angular 2 template tags say object is undefined

后端 未结 1 1693
一整个雨季
一整个雨季 2020-12-04 01:59

Dealing with strange issue in Angular 2.

If you look in the component below, the service returns a parsed object – for instance I can console.log it. Yo

相关标签:
1条回答
  • 2020-12-04 02:43

    Try: {{theData?.subject}} or <span *ngIf="theData">{{theData.subject}}</span>.

    The why is in lots of duplicated questions:

    Angular 2: TypeError: l_thing0 is undefined in [{{thing.title}} in AppComponent@4:44]

    0 讨论(0)
提交回复
热议问题