0

My new Angular has a Dashboard with 3 widgets. For one widget (PreviousInquiriesComponent) I want to add a resolver such that that widget is not displayed until data for it is ready.

    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?
Malindu Sandaruwan
  • 1,477
  • 2
  • 13
  • 27

1 Answers1

1

The problem is happening because you are activating three components in three outlets on the basis of same route. if these three had different routes, this problem wouldn't occur. Either change your routing config to have different child routes or remove resolve from here.

Aakash Garg
  • 10,649
  • 2
  • 7
  • 25