Angular - Wait until I receive data before loading template

前端 未结 3 1011
野的像风
野的像风 2020-12-23 17:20

So, I have a component that renders several components dynamically, with this template:

3条回答
  •  滥情空心
    2020-12-23 17:27

    You could use a resolver to ensure those data are loaded (or your filters have been initialized) before the route is activated.

    https://blog.thoughtram.io/angular/2016/10/10/resolving-route-data-in-angular-2.html

    https://angular.io/api/router/Resolve

提交回复
热议问题