-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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(router): lazy routing tries loading destroyed module #24987
Conversation
a78f4b9
to
a405be9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please squash down to 2 commits, with detailed and scoped commit messages for both. The first should add destroyed()
in core
, the second should make use of the feature in `apply_redirects.ts.
6759be2
to
c106859
Compare
This affects public API surface, so you will need to update the golden files of the public API. See CircleCI logging: CircleCI summary
|
@JoostK Thanks, fixed. |
Travis-CI is having issues unrelated to this PR:
|
Update on this issue: Overall this looks great. However, the change to the public API is a pretty big breaking change. It means any code implementing I'm looking at how we can get this rolled out so we can move forward and merge this PR. Thanks for the patience. |
Let me know if there is anything else I can do. I don't like breaking user code either, if the general consensus is that this is not to be merged, then I would like to know an alternative proposals to fix this bug. |
Discussed this one and it looks like we might be able to make this change by updating a couple internal Google users who are implementing this API. So I think we can move forward on this one. Doing internal testing here: |
@jasonaden Is there any plan moving forward? We have a feature that depends on this fix |
NgModuleRef (core/src/render3): When a module is destroyed, it will call all the on destroy callbacks. When finished it is set to null (default state is empty array []). We use the state of the destroyCbs variable for our destroyed boolean getter. --- NgModuleRef_ (core/src/view/): provide getter for _destroyed variable. ---
@jasonaden @alxhub is there anything left for me to do here? Please let me know, I would like this bug fixed. |
I've added a test commit as it is the only way to retrigger CI, I will force delete it and force push. |
6743e97
to
681b095
Compare
Rebased the PR against the current master just to be a 100% sure. |
2dabcf1
to
cc648fb
Compare
Oh god, review hell. I suppose it's not worth breaking the public API over this, so I think #28405 will also do the trick. |
Closing in favour of #28405 |
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. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The router can lazy load modules. It doesn't check whether that module has been destroyed or not.
Issue Number: #24962
What is the new behavior?
If it has been destroyed, it will create a new instance of it.
Does this PR introduce a breaking change?
Other information
I'm a complete noob to angular and I need this change 😘