Angular 2 - Show loading-information when (observableData | async) is not yet resolved

前端 未结 6 2114
抹茶落季
抹茶落季 2020-12-29 05:13

just as the title says, I want to embrace the power of rxjs Observables.

What I do now:

// dataview.html
Loading data
6条回答
  •  执念已碎
    2020-12-29 05:35

    One way to do that without any member property could be evaluating the async observable results in the template: !(yourAsyncData$ | async) or !(yourAsyncData$ | async)?.length.

    For instance: ...

提交回复
热议问题