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

Set uiOptions.reload of [uiSref] to a future load state name lead to error at first load #753

Closed
liwonder opened this issue Mar 30, 2021 · 1 comment
Labels

Comments

@liwonder
Copy link

liwonder commented Mar 30, 2021

I am using Angular 9, and have several [uiSref] which have same state name of a future load state, but they have different params. And also I have set same 'uiOptions.reload' to reload for them. The 'uiOptions.reload' is set ti the state name which will be added by the future module.

I want to make it reload when click on these [uiSref], since they have same target name but have different params.

when I first click on one of [uiSref] the future module will be loaded, but there will be an error says 'No such reload state'.

I tracked down the call stacks and found that when the module is loaded and applied, the older state 'future.state.**' will be deregistered and it will notify the [uiSref] to call the 'update' function. But the newly added state in the future model have not been registered at this time, so it can't find the reload state, and thow the error.

Can any body suggest one solution to this? Or does this to be one bug?

@stale
Copy link

stale bot commented Sep 26, 2021

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.

This does not mean that the issue is invalid. Valid issues
may be reopened.

Thank you for your contributions.

@stale stale bot added the stale label Sep 26, 2021
@stale stale bot closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant