To ensure proper URL synchronization and prevent infinite navigation loops between Angular and single-spa, you must provide the SingleSpaPlatformLocation class to the Angular platform. This is required for all applications, whether they use NgZone or are zoneless.
Pass the result of provideSingleSpaPlatform() to platformBrowser() during your application bootstrapping process within the bootstrapFunction of your single-spa-angular configuration.
const lifecycles = singleSpaAngular({
bootstrapFunction: async () => {
const platformRef = platformBrowser(provideSingleSpaPlatform());
return bootstrapApplication(AppComponent, appConfig, { platformRef });
},
template: '<app-root />',
NgZone: 'noop',
Router,
NavigationStart,
});