Angular Module Federation Interceptors of Remote Apps not loaded

48 Views Asked by At

Basically I am using module federation in angular with the following context:

  1. Shell Application with its own HTTP_INTERCEPTORS
  2. Remote App One with its own ONE_HTTP_INTERCEPTORS
  3. Remote App Two which uses only HttpClient, no need for feauture interceptors.

Good Scenario: Starting shell and going directly for the FIRST time on Remote App One => ONE_HTTP_INTERCEPTORS triggered

Problem Scenario: Starting Shell and going directly for the FIRST time to Remote App Two then switching to Remote App One => ONE_HTTP_INTERCEPTORS not triggered... I suspect that's because they're not loaded for the first time with those from shell. Here If I refresh the page it will get ONE_HTTP_INTERCEPTORS triggered again.

So to sum up, the problem is that my feature interceptors are triggered/created only when load Remote App One for the FIRST time, otherwise NOT.

Any insights?

I have followed this documentation to extend my HttpClient with one custom in the Remote App One but still the same issues.. https://angularindepth.com/posts/1455

I have tried above scenarios and didn't manage to make the app working correctly under the shell..

0

There are 0 best solutions below