Subscribing to an observable in an Angular 2 HTML element

前端 未结 2 1490
滥情空心
滥情空心 2021-01-19 04:48

I have an observable producing Users that have an isLoading property, such that this yields the expected result:

{{ (user$ | async)         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-19 05:04

    You can use async pipe in html tag like in example below, just don't forget safe operator:

    
    

提交回复
热议问题