Casting a type (interface) via map to observable

后端 未结 3 1112
野的像风
野的像风 2020-12-19 05:11

I\'ve been learning TypeScript with Angular. And currently I stuck as this moment. Previously I used subscribed method and everything works flawlessly, but not I decided to

3条回答
  •  孤城傲影
    2020-12-19 05:42

    The Angular async template pipe subscribes to the Observable, that is how it is able to access the restaurant object and its properties in the template.

    If you want to access to these same thing in the component controller then you need to make a subscription in the component controller.

提交回复
热议问题