New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to pass BootstrapOptions
when bootstrapping standalone application
#47538
Comments
Hi @edbzn and THX for opening this issue! I tried a lot the last days to get it working... One clean solution could be to use DI and override What is a ugly workaround is to provide zone.js in the bundle but flag all used API's so you don't actually patch them. Even if zone-less CD is an active topic I don't think everyone needs is to go standalone. Happy to hear the teams opinion here. 🙏 |
This was a deliberate choice we made when designing
For now, continue to use |
FYI, as @BioPhoton suggested above, the following does not have the expected effect (although it does somehow manage to break Zone entirely...) bootstrapApplication(AppComponent, {
providers: [
{
provide: NgZone,
useValue: new NgZone({ shouldCoalesceEventChangeDetection: false })
},
]
}); |
@MaximSagan that good, I make it work with angular |
zone.js event coalescing is a good use-case and the option we should support. I'm going to re-open this issue so we can adjust the API. |
@pkozlowski-opensource thank you so much, that's very kind of you, after zoneless enable to work with standalone version, I can make my test with angular workable with vite |
Hello. |
I think this feature is very important, it enable me to make angular work with Vite, please take a look <3 |
btw I think this PR is for this issue? #49079 |
Per Andrew Scott's comment in #49079, the team hasn't settled for an API yet but it seems in progress with the landing of the signal proposal. |
This is fixed with #49557 (set coalescing options via |
It is indeed, thnx @elgreco247 Fixed in #49557 |
@pkozlowski-opensource I think current fix is not the purpose of issue, the issue mean add: |
|
@hiepxanh IIUC it is now possible using DI: |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are relevant/related to the feature request?
platform-browser
Description
Hi there,
I started to convert a Zoneless application to standalone components, and I noticed it's not possible to bootstrap a standalone application without Zone.js, so I have to keep the AppModule to be able to pass the ngZone configuration at bootstrap.
Proposed solution
It would be nice to be able to pass the
BootstrapOptions
to thebootstrapApplication
function like so:Alternatives considered
N/A
The text was updated successfully, but these errors were encountered: