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

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@jasonaden
Copy link
Contributor

jasonaden commented Dec 4, 2018

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

@googlebot googlebot added the cla: yes label Dec 4, 2018

@jasonaden jasonaden requested a review from alxhub Dec 4, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 4, 2018

@alxhub

alxhub approved these changes Dec 4, 2018

@alxhub

This comment has been minimized.

Copy link
Contributor

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 jasonaden:FW-744_guards_on_path_query_changes branch from e9fd440 to 0aaa097 Dec 4, 2018

@jasonaden

This comment has been minimized.

Copy link
Contributor Author

jasonaden commented Dec 4, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 4, 2018

Show resolved Hide resolved tools/public_api_guard/router/router.d.ts Outdated

@jasonaden jasonaden force-pushed the jasonaden:FW-744_guards_on_path_query_changes branch from 0aaa097 to b005f21 Dec 4, 2018

@jasonaden jasonaden changed the title feat(router): add pathOrQueryParamsChange mode for runGuardsAndResolvers feat(router): add pathParamsOrQueryParamsChange mode for runGuardsAndResolvers Dec 5, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 5, 2018

@jasonaden jasonaden force-pushed the jasonaden:FW-744_guards_on_path_query_changes branch from b005f21 to 1fb4cc5 Dec 5, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Dec 5, 2018

@IgorMinar

This comment has been minimized.

Copy link
Member

IgorMinar commented Dec 5, 2018

@jasonaden can you please rebase?

@IgorMinar
Copy link
Member

IgorMinar left a comment

lgtm but needs a rebase

feat(router): add pathParamsOrQueryParamsChange mode for runGuardsAnd…
…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 #26861 #18253

@jasonaden jasonaden force-pushed the jasonaden:FW-744_guards_on_path_query_changes branch from 1fb4cc5 to 6cf6539 Dec 5, 2018

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented 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

feat(router): add predicate function mode for runGuardsAndResolvers
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

feat(router): add predicate function mode for runGuardsAndResolvers
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 added a commit that referenced this pull request Dec 18, 2018

feat(router): add predicate function mode for runGuardsAndResolvers (#…
…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 added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

feat(router): add predicate function mode for runGuardsAndResolvers (a…
…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 added a commit to IgorMinar/angular that referenced this pull request Dec 19, 2018

feat(router): add predicate function mode for runGuardsAndResolvers (a…
…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 added a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019

feat(router): add pathParamsOrQueryParamsChange mode for runGuardsAnd…
…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 added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

feat(router): add pathParamsOrQueryParamsChange mode for runGuardsAnd…
…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 added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

feat(router): add predicate function mode for runGuardsAndResolvers (a…
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.