question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to pass `BootstrapOptions` when bootstrapping standalone application

See original GitHub issue

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.

platformBrowserDynamic()
  .bootstrapModule(AppModule, {
    ngZone: 'noop',
  });

Proposed solution

It would be nice to be able to pass the BootstrapOptions to the bootstrapApplication function like so:

bootstrapApplication(AppComponent, { ngZone: 'noop' })

Alternatives considered

I can’t find any alternative, I think you know more than me if there are viable alternatives.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:13
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
pkozlowski-opensourcecommented, Oct 19, 2022

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.

5reactions
alxhubcommented, Sep 26, 2022

This was a deliberate choice we made when designing bootstrapApplication - we chose to create a minimal API that didn’t carry over any of the options from the bootstrapModule API.

ngZone: 'noop' is what I would consider an advanced, low-level option. It’s not something you can just set - using this option requires completely rethinking how state works in your application and how change detection is triggered.

For now, continue to use bootstrapModule if you require a zoneless application. Reactivity, Change Detection, and “zoneless” is an area of focus for us in 2023, so we hope to have a real story here at some point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrapping - AWS Cloud Development Kit (AWS CDK) v2
Bootstrapping is the process of provisioning resources for the AWS CDK before you can deploy AWS CDK apps into an AWS environment ....
Read more >
Bootstrapping :: SUSE Manager Documentation
Option Description Default Host The hostname of the client to be registered ‑ SSH port The port on the client that allows SSH access 22 User...
Read more >
Bootstrap a Node - Learn Chef
This enables the newly-bootstrapped chef-client to be able to read items from the vault. Only a single client is authorized at a time...
Read more >
Command 'juju bootstrap'
juju bootstrap [options] [<cloud name>[/region] [<controller name>]] ... If --bootstrap-constraints is used, its values will also apply to any future ...
Read more >
Command 'juju bootstrap' - doc - Charmhub
Usage: juju bootstrap [options] [<cloud name>[/region] [<controller name>]] ... If --bootstrap-constraints is used, its values will also apply to any future ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found