Skip to content

feat(core): add bootstrapApplication function#45674

Closed
AndrewKushnir wants to merge 2 commits intoangular:masterfrom
AndrewKushnir:standalone-bootstrap
Closed

feat(core): add bootstrapApplication function#45674
AndrewKushnir wants to merge 2 commits intoangular:masterfrom
AndrewKushnir:standalone-bootstrap

Conversation

@AndrewKushnir
Copy link
Contributor

Note: this is a draft as it relies on some missing functionality (such as a standalone injector service and other standalone components public API).

This commit implements the bootstrapApplication function that allows bootstrapping an application and pass a standalone component as a root component.

PR Type

What kind of change does this PR introduce?

  • Feature

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added state: WIP area: core Issues related to the framework runtime target: major This PR is targeted for the next major release labels Apr 19, 2022
@ngbot ngbot bot modified the milestone: Backlog Apr 19, 2022
@AndrewKushnir AndrewKushnir force-pushed the standalone-bootstrap branch 4 times, most recently from d34f052 to ae85c42 Compare April 19, 2022 03:12

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is this interface something that can / should be shared across platforms? Would it makes sense to move it to core and export from here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the code is structured as follows:

  • the @angular/core has an internal implementation of the bootstrapApplication function, which has more fields than a public version of the bootstrapApplication (for ex. it has a list of platform providers)
  • the @angular/platform-browser uses an internal bootstrapApplication function and exposes a function with a slightly different interface (the public version) as a public API

My thinking is that the public function and supported interfaces should be co-located (i.e. located in @angular/platform-browser) as the ApplicationConfig might potentially vary depending on a platform (for ex. there might be more configuration required for SSR, etc).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably do want to share ApplicationConfig across platforms, but we'll probably do that if/when we move bootstrapApplication to core.

@AndrewKushnir AndrewKushnir force-pushed the standalone-bootstrap branch 6 times, most recently from 6ff45bd to eb69b66 Compare April 21, 2022 02:40
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer feature Label used to distinguish feature request from other issues and removed state: WIP labels Apr 21, 2022
@AndrewKushnir AndrewKushnir requested a review from alxhub April 21, 2022 02:42
@AndrewKushnir AndrewKushnir marked this pull request as ready for review April 21, 2022 02:42
@pullapprove pullapprove bot requested review from atscott and jessicajaniuk and removed request for pkozlowski-opensource April 21, 2022 02:42
@pullapprove pullapprove bot requested a review from dylhunn April 21, 2022 05:16
@AndrewKushnir AndrewKushnir force-pushed the standalone-bootstrap branch 3 times, most recently from c568c5e to 4e4c589 Compare April 21, 2022 19:16
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: public-api,size-tracking

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably do want to share ApplicationConfig across platforms, but we'll probably do that if/when we move bootstrapApplication to core.

Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@pullapprove pullapprove bot requested review from atscott and jessicajaniuk April 21, 2022 23:02
This commit implements the `bootstrapApplication` function that allows bootstrapping an application and pass a standalone component as a root component.
This commit adds 2 integration apps to verify the `bootstrapApplication` API behavior as well as keep track of the bundle size and retained symbols (tree-shaking).
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 21, 2022
@AndrewKushnir
Copy link
Contributor Author

Merge-assistance: PR is ready for merge.

@atscott
Copy link
Contributor

atscott commented Apr 22, 2022

This PR was merged into the repository by commit 3e46a42.

@atscott atscott closed this in 5771b18 Apr 22, 2022
atscott pushed a commit that referenced this pull request Apr 22, 2022
…API (#45674)

This commit adds 2 integration apps to verify the `bootstrapApplication` API behavior as well as keep track of the bundle size and retained symbols (tree-shaking).

PR Close #45674
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime feature Label used to distinguish feature request from other issues merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants