Skip to content
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

fix(upgrade): allow for downgraded components to work with component-router #50871

Conversation

devversion
Copy link
Member

In the past, we had an implementation of the "Angular 2" router that also worked with AngularJS. Published as @angular/router. We continued to expose that router implementation in G3 and some applications still use it. Now, when upgrading, they are seeing issues where the router throws because it cannot find a route config/ or $canActivate on the controller- simply because there is no controller function for downgraded components.

We can fix this and unblock the update by simply ensuring a controller function is defined.

Context: https://critique.corp.google.com/cl/539971007

…router

In the past, we had an implementation of the "Angular 2" router that
also worked with AngularJS. Published as `@angular/router`. We continued
to expose that router implementation in G3 and some applications still
use it. Now, when upgrading, they are seeing issues where the router
throws because it cannot find a route config/ or `$canActivate` on the
controller- simply because there is no `controller` function for
downgraded components.

We can fix this and unblock the update by simply ensuring a controller
function is defined.
@devversion devversion added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Jun 28, 2023
@devversion
Copy link
Member Author

Caretaker note: G3 failures are unrelated to this change.

@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer area: upgrade Issues related to AngularJS → Angular upgrade APIs labels Jun 28, 2023
@devversion devversion marked this pull request as ready for review June 28, 2023 12:11
@ngbot ngbot bot modified the milestone: Backlog Jun 28, 2023
@pullapprove pullapprove bot requested a review from alxhub June 28, 2023 12:11
@devversion devversion requested review from jessicajaniuk and removed request for alxhub June 28, 2023 12:11
@jessicajaniuk jessicajaniuk added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 28, 2023
@alxhub
Copy link
Member

alxhub commented Jun 30, 2023

This PR was merged into the repository by commit a19a87d.

alxhub pushed a commit that referenced this pull request Jun 30, 2023
…router (#50871)

In the past, we had an implementation of the "Angular 2" router that
also worked with AngularJS. Published as `@angular/router`. We continued
to expose that router implementation in G3 and some applications still
use it. Now, when upgrading, they are seeing issues where the router
throws because it cannot find a route config/ or `$canActivate` on the
controller- simply because there is no `controller` function for
downgraded components.

We can fix this and unblock the update by simply ensuring a controller
function is defined.

PR Close #50871
@alxhub alxhub closed this in a19a87d Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: upgrade Issues related to AngularJS → Angular upgrade APIs hotlist: google merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants