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

fix(angular): pass navigation options to router when using NavController #18468

Merged
merged 6 commits into from Jun 10, 2019

Conversation

Projects
None yet
3 participants
@MarkChrisLevy
Copy link
Contributor

commented Jun 5, 2019

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

When navigateForward or navigateBack is called with url as string or UrlTree, navigation options are not passed to angular router. When url is an array, options are passed properly.

Issue Number: #18469

What is the new behavior?

Navigation options must be always passed to angular router.

Does this introduce a breaking change?

  • Yes
  • No

MarkChrisLevy added some commits Dec 19, 2018

Pass navigation options to router
Navigation options must be passed to angular router.
@masimplo

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

Maybe this is related to angular/angular#18798?

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

Thanks for the PR! Yep, that issue is related @masimplo. navigateByUrl will ignore most of the NavigationExtras that modify the url (which is why there is that extra case for handling fragment and queryParams when creating the UrlTree).

@liamdebeasi
Copy link
Member

left a comment

Looks great! Just want to add some documentation

Show resolved Hide resolved angular/src/providers/nav-controller.ts

@liamdebeasi liamdebeasi changed the title Pass navigation options to router fix(angular): pass navigation options to router when using NavController Jun 6, 2019

Update angular/src/providers/nav-controller.ts
Co-Authored-By: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Hey there,

You will need to run npm run lint to get these tests to pass.

liamdebeasi added some commits Jun 10, 2019

@liamdebeasi liamdebeasi merged commit 7610787 into ionic-team:master Jun 10, 2019

1 check passed

build Workflow: build
Details
@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Thank you! 🎉

abennouna added a commit to abennouna/ionic that referenced this pull request Jun 11, 2019

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.