我的新 Angular 有一个带有 3 个小部件的仪表板。对于一个小部件 ( PreviousInquiriesComponent
),我想添加一个解析器,以便在它的数据准备好之前不会显示该小部件。
children: [
{
path: '',
component: ProfileComponent,
outlet: 'outlet1'
},
{
path: '',
component: PreviousInquiriesComponent,
outlet: 'outlet2',
resolve: {
inquiries: InquiryResolver
},
},
{
path: '',
component: ProfileComponent,
outlet: 'outlet3'
}
]},```
But when I add the resolver, none of the widgets in the dashboard loads until data for that widget is ready. How can I solve this issue? Should I avoid using resolvers here?