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

feat(router): add pathParamsOrQueryParamsChange mode for runGuardsAndResolvers #27464

Conversation

jasonaden
Copy link
Contributor

This option means guards and resolvers will ignore changes to matrix parameters. Guards and resolvers will be rerun when the path changes, when path parameters change, or when query parameters change.

Related to #26861 #18253

@mary-poppins
Copy link

You can preview e9fd440 at https://pr27464-e9fd440.ngbuilds.io/.

@alxhub
Copy link
Member

alxhub commented Dec 4, 2018

The only thing I would suggest is adding some detail to the commit description - what the motivation for the new mode is, etc :)

@jasonaden jasonaden force-pushed the FW-744_guards_on_path_query_changes branch from e9fd440 to 0aaa097 Compare December 4, 2018 22:25
@jasonaden jasonaden added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release labels Dec 4, 2018
@jasonaden
Copy link
Contributor Author

Presubmit

@mary-poppins
Copy link

You can preview 0aaa097 at https://pr27464-0aaa097.ngbuilds.io/.

@IgorMinar IgorMinar added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Dec 4, 2018
@jasonaden jasonaden force-pushed the FW-744_guards_on_path_query_changes branch from 0aaa097 to b005f21 Compare December 4, 2018 23:59
@jasonaden jasonaden changed the title feat(router): add pathOrQueryParamsChange mode for runGuardsAndResolvers feat(router): add pathParamsOrQueryParamsChange mode for runGuardsAndResolvers Dec 5, 2018
@mary-poppins
Copy link

You can preview b005f21 at https://pr27464-b005f21.ngbuilds.io/.

@jasonaden jasonaden force-pushed the FW-744_guards_on_path_query_changes branch from b005f21 to 1fb4cc5 Compare December 5, 2018 00:36
@jasonaden jasonaden removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Dec 5, 2018
@mary-poppins
Copy link

You can preview 1fb4cc5 at https://pr27464-1fb4cc5.ngbuilds.io/.

@IgorMinar IgorMinar added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Dec 5, 2018
@IgorMinar
Copy link
Contributor

@jasonaden can you please rebase?

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

lgtm but needs a rebase

…Resolvers

This option means guards and resolvers will ignore changes to matrix parameters. Guards and resolvers will be rerun when the path changes, when path parameters change, or when query parameters change.

The primary use case for such a mode is when updating the UI and getting the URL to be in sync with local changes. For example, if displaying a sortable table, changing the sort direction is often handled by the table itself. But you would want to update the URL to be in sync with what's being displayed to the user. As long as the table sort direction is stored as a matrix parameter, you can use this option to update the URL without causing the overhead of re-running guards and resolvers.

Related to angular#26861 angular#18253
@jasonaden jasonaden force-pushed the FW-744_guards_on_path_query_changes branch from 1fb4cc5 to 6cf6539 Compare December 5, 2018 17:40
@mary-poppins
Copy link

You can preview 6cf6539 at https://pr27464-6cf6539.ngbuilds.io/.

@jasonaden jasonaden removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Dec 5, 2018
@IgorMinar IgorMinar added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Dec 5, 2018
@IgorMinar IgorMinar closed this in d70a7f3 Dec 5, 2018
jasonaden added a commit to jasonaden/angular that referenced this pull request Dec 14, 2018
This option means guards and resolvers will ignore changes when a provided predicate function returns `false`. This supports use cases where an application needs to ignore some param updates but not others. For example, changing a sort param in the URL might need to be ignored, whereas changing the a `project` param might require re-run of guards and resolvers.

Related to angular#26861 angular#18253 angular#27464
jasonaden added a commit to jasonaden/angular that referenced this pull request Dec 17, 2018
This option means guards and resolvers will ignore changes when a provided predicate function returns `false`. This supports use cases where an application needs to ignore some param updates but not others. For example, changing a sort param in the URL might need to be ignored, whereas changing the a `project` param might require re-run of guards and resolvers.

Related to angular#26861 angular#18253 angular#27464
mhevery pushed a commit that referenced this pull request Dec 18, 2018
…27682)

This option means guards and resolvers will ignore changes when a provided predicate function returns `false`. This supports use cases where an application needs to ignore some param updates but not others. For example, changing a sort param in the URL might need to be ignored, whereas changing the a `project` param might require re-run of guards and resolvers.

Related to #26861 #18253 #27464

PR Close #27682
IgorMinar pushed a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…ngular#27682)

This option means guards and resolvers will ignore changes when a provided predicate function returns `false`. This supports use cases where an application needs to ignore some param updates but not others. For example, changing a sort param in the URL might need to be ignored, whereas changing the a `project` param might require re-run of guards and resolvers.

Related to angular#26861 angular#18253 angular#27464

PR Close angular#27682
IgorMinar pushed a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018
…ngular#27682)

This option means guards and resolvers will ignore changes when a provided predicate function returns `false`. This supports use cases where an application needs to ignore some param updates but not others. For example, changing a sort param in the URL might need to be ignored, whereas changing the a `project` param might require re-run of guards and resolvers.

Related to angular#26861 angular#18253 angular#27464

PR Close angular#27682
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
…Resolvers (angular#27464)

This option means guards and resolvers will ignore changes to matrix parameters. Guards and resolvers will be rerun when the path changes, when path parameters change, or when query parameters change.

The primary use case for such a mode is when updating the UI and getting the URL to be in sync with local changes. For example, if displaying a sortable table, changing the sort direction is often handled by the table itself. But you would want to update the URL to be in sync with what's being displayed to the user. As long as the table sort direction is stored as a matrix parameter, you can use this option to update the URL without causing the overhead of re-running guards and resolvers.

Related to angular#26861 angular#18253

PR Close angular#27464
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…Resolvers (angular#27464)

This option means guards and resolvers will ignore changes to matrix parameters. Guards and resolvers will be rerun when the path changes, when path parameters change, or when query parameters change.

The primary use case for such a mode is when updating the UI and getting the URL to be in sync with local changes. For example, if displaying a sortable table, changing the sort direction is often handled by the table itself. But you would want to update the URL to be in sync with what's being displayed to the user. As long as the table sort direction is stored as a matrix parameter, you can use this option to update the URL without causing the overhead of re-running guards and resolvers.

Related to angular#26861 angular#18253

PR Close angular#27464
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…ngular#27682)

This option means guards and resolvers will ignore changes when a provided predicate function returns `false`. This supports use cases where an application needs to ignore some param updates but not others. For example, changing a sort param in the URL might need to be ignored, whereas changing the a `project` param might require re-run of guards and resolvers.

Related to angular#26861 angular#18253 angular#27464

PR Close angular#27682
@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 Sep 14, 2019
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 cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants