Question
The comment on the provideSingleSpaPlatform() method is
/**
* The `PlatformLocation` class is injected into `PathLocationStrategy`,
* which creates a `Subject` internally for listening to `popstate` events. We provide
* this custom class in the root injector used during application bootstrapping.
*
* THIS IS REQUIRED FOR ALL APPLICATIONS (BOTH ZONE AND ZONELESS). Pass the result of
* this function to `platformBrowser()` when bootstrapping your application:
*
* @example
* const lifecycles = singleSpaAngular({
* bootstrapFunction: async () => {
* const platformRef = platformBrowser(provideSingleSpaPlatform());
* return bootstrapApplication(AppComponent, appConfig, { platformRef });
* },
* template: '<app-root />',
* NgZone: 'noop',
* Router,
* NavigationStart,
* });
*/
But in the mount method there's this comment.
// However, if the app is running in zoneless mode (`NgZone: 'noop'`), change detection is
// managed manually and the platform location override is not needed, so we skip this check.
This means I should be able to get away with this setup right?
const lifecycles = singleSpaAngular({
bootstrapFunction: (singleSpaProps: SingleSpaProps) => {
singleSpaPropsSubject.next(singleSpaProps);
return bootstrapApplication(AppComponent, appConfig);
},
template: '<my-mfe-root />',
NavigationStart,
NgZone: 'noop',
});
Environment
Libs:
- @angular/core version: 22.1.0
- single-spa-angular version: 21.0.2
Question
The comment on the
provideSingleSpaPlatform()method isBut in the mount method there's this comment.
This means I should be able to get away with this setup right?
Environment