So my application is based on angular 2(angular cli) and some CMS. Some fragments of page are downloaded from CMS and displayed on angular 2 page. The main problem is that the header and footer are from CMS. So I wonder how to add global resolver(global is very important, I dont want to add resolver for every route path in application), that will force angular to wait till CMS will return header and footer. I am already successfully using resolver to wait for some data on some routes by implementing route interface
export class InboxResolver implements Resolve<MessageListItem[]>
and I am using it in some custom routes:
const MessagesRoutes: Routes = [
{
path: 'inbox',
component: InboxComponent,
resolve: { messages: InboxResolver }
}
];
But how to define one global HeaderAndFooterResolver in one place?