Angular 2 - Displaying async Object data from promise

前端 未结 7 902
野性不改
野性不改 2020-12-02 22:57

Edit: It looks like my main problem now is that I can\'t seem to display async data from an object. I have a promise containing the data object, and when I use



        
7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 23:28

    You can also use pluck from rxjs/observable:

    {{ user.pluck("name") | async }}
    

    Pluck Returns an Observable containing the value of a specified nested property from all elements in the Observable sequence. If a property can't be resolved, it will return undefined for that value.

提交回复
热议问题