Display loading while using Observable with Async pipe in template

后端 未结 3 936
感情败类
感情败类 2021-02-20 15:01

Situation: I am using FirebaseObjectObservable to populate my Ionic 2 (rc0) template. Template code:


  

{{(course | async)?.des

3条回答
  •  感动是毒
    2021-02-20 15:48

    Maybe a little late but in case someone else is wondering how to manage this... What about using a template?

    you could for example use something like:

    
      

    {{course.description}}


    Learning Objectives

    • {{objective.text}}

    Takeaway

    • {{takeaway.text}}
    Loading stuff...

    so your ion-card-content will be hidden, showing the #template, until the async pipe is loaded.

提交回复
热议问题