Please upgrade to 3.4.1 instead of using 3.4.0 - there's an important fix
Breaking change
We published this as 3.4.0 even though it contains a breaking change, since 4.x is already taken for Angular 9 support.
*The back button bug fixed in 3.3.1 and 3.3.2 will come back unless you add the singleSpaExtraProviders to your code. See Fixes section below for how to do that.
Features
- single-spa-angular@3 now exports a function
getSingleSpaExtraProviders
that should be injected into your application.
Fixes
- The infinite redirect bug is fixed! (#113 #192) The bug fix only works with the following conditions:
- You must be using single-spa-angular@>=3.4.0
- You must provide the extra single-spa providers, as shown below
import { NgZone } from '@angular/core';
import { Router } from '@angular/router';
import singleSpaAngular, { getSingleSpaExtraProviders } from 'single-spa-angular';
const lifecycles = singleSpaAngular({
bootstrapFunction: singleSpaProps => {
singleSpaPropsSubject.next(singleSpaProps);
return platformBrowserDynamic(getSingleSpaExtraProviders()).bootstrapModule(AppModule);
},
template: '<app-root />',
Router,
NgZone,
});