Skip to content

refactor(router): remove runtime support for loadChildren string syntax - #43575

Closed
JoostK wants to merge 2 commits into
angular:masterfrom
JoostK:remove-loadchildren-string
Closed

JoostK wants to merge 2 commits into
angular:masterfrom
JoostK:remove-loadchildren-string

Conversation

@JoostK

@JoostK JoostK commented Sep 24, 2021

Copy link
Copy Markdown
Member

This commit removes the ability to configure lazy routes using a string
for loadChildren, together with the NgModule loader implementation
based on SystemJS from @angular/core.

BREAKING CHANGE:

It is no longer possible to use Route.loadChildren using a string
value, as the runtime support for loading the corresponding NgModule
has been removed from @angular/core.

@JoostK JoostK added state: WIP breaking changes area: router area: core Issues related to the framework runtime target: major This PR is targeted for the next major release labels Sep 24, 2021
@google-cla google-cla Bot added the cla: yes label Sep 24, 2021
@ngbot ngbot Bot modified the milestone: Backlog Sep 24, 2021

@IgorMinar IgorMinar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM for api changes. thanks!

Reviewed-for: public-api,docs-packaging-and-releasing

Comment thread packages/router/src/router_module.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
return Promise.reject(new Error('string based `loadChildren` is unavailable'));
return Promise.reject(new Error('`loadChildren` is no longer supported'));

Comment thread packages/router/src/router_module.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
'The usage of `loadChildren` with a module path string is no longer available. Find more at https://v12.angular.io/api/router/LoadChildrenCallback to learn about the new approach.'));
'The usage of `loadChildren` with a module path string is no longer supported. Find more at https://v12.angular.io/api/router/LoadChildrenCallback to learn about the new approach.'));

…ntax

This commit removes the ability to configure lazy routes using a string
for `loadChildren`, together with the NgModule loader implementation
based on SystemJS from `@angular/core`.

BREAKING CHANGE:

It is no longer possible to use `Route.loadChildren` using a string
value, as the runtime support for loading the corresponding NgModule
has been removed from `@angular/core`.
@JoostK
JoostK force-pushed the remove-loadchildren-string branch from a8dd45f to dfd2cb0 Compare September 29, 2021 06:28
@IgorMinar
IgorMinar self-requested a review September 29, 2021 19:55

@IgorMinar IgorMinar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

withdrawing my approval in favor of #43591

Reviewed-for: public-api, docs-packaging-and-releasing

@JoostK JoostK closed this Sep 30, 2021
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Oct 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: core Issues related to the framework runtime area: router breaking changes cla: yes state: WIP target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants