Code comments are confusing on correct way to setup zoneless.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- angular, typescript
- Domain
- documentation, frontend
Research direction
Start by locating the provideSingleSpaPlatform() documentation and the mount method comment referenced in the issue. Compare their guidance for zoned and zoneless setups, then update the comments and example so the required configuration is unambiguous. Verify that the documented setup matches the behavior of single-spa-angular 21.0.2 with Angular 22.1.0.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 209
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from single-spa/single-spa-angular
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
single-spa/single-spa-angular#534 · 2 comments ·
All issues in single-spa/single-spa-angular
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·