2 years ago

#24169

test-img

langeles86

Angular 11 with MSAL app and using Parcels removing app-redirect at the unmount point

I am using angular 11 application with msal 2.0. So to according to https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/v2-docs/redirects.md i am using app-redirect selector to index.html.

So i am using a parcel to apply to a

<div #microfrontendLoadedHere />

and in the component i call my service applying the single

https://single-spa.js.org/docs/parcels-overview/#unmount

when i want to unmount the parcel which is containing the part which is rendered there.

Is here where it cames really odd because i am using as mount this:

mountRootParcel( app, {
   domElement,
   appName
})

My dom element is a viewchild with static: true of the reference in the div. So the unmount is removing the app-redirect selector and i don't get a clue why.

Far as i know in the documentation of single-spa it is referred the removal of all DOM, but the one created at the moment of the rendering of the new parcel so no sense to remove a thing like this selector which is giving me headaches due to the flow into the parcel and unmounting starts to fail when tries to remove again the app-redirect selector twice.

Any clue on this?

angular

azure-ad-msal

micro-frontend

single-spa

0 Answers

Your Answer

Accepted video resources