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

refactor(RouteTraverser): Expand traverser to also track query params and location changes #85

Merged
merged 1 commit into from
May 3, 2016

Conversation

MikeRyanDev
Copy link
Member

Traverser now accepts a LocationChange instead of a pathname. Returned Match now includes the LocationChange and the query params. RouterInstruction is no longer responsible for parsing query params. Guards now receive query params and the location change as a result of this refactoring.

BREAKING CHANGE:

TraversalCandidate interface has renamed params to routeParams and now includes queryParams and locationChange.

Before:

  const { params, isTerminal, route } = traversalCandidate;

After:

  const { routeParams, queryParams, isTerminal, route, locationChange } = traversalCandidate;

… and location changes

Traverser now accepts a LocationChange instead of a pathname. Returned Match now includes the LocationChange and the query params. RouterInstruction is no longer responsible for parsing query params. Guards now receive query params and the location change as a result of this refactoring.

BREAKING CHANGE:

  TraversalCandidate interface has renamed `params` to `routeParams` and now includes queryParams and locationChange.

  Before:

  ```ts
  const { params, isTerminal, route } = traversalCandidate;
  ```

  After:

  ```ts
  const { routeParams, queryParams, isTerminal, route, locationChange } = traversalCandidate;
  ```
@brandonroberts brandonroberts merged commit a373b92 into ngconf May 3, 2016
@MikeRyanDev MikeRyanDev deleted the refactor/route-traverser branch May 3, 2016 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants