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

Add angular router's NavigationExtras support #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rafabernad
Copy link

Current implementation discards the rich parametrized navigation that angular router supports with NavigationExtras.

This PR enables using Navigation extras within the payload while keeping compatibility with the current implementation, enabling dispatching events with richer payloads.

@rafabernad rafabernad closed this Nov 8, 2016
@rafabernad
Copy link
Author

I'll update package dependencies and make a new pull request with them

@rafabernad rafabernad reopened this Nov 8, 2016
@dagstuan
Copy link
Owner

dagstuan commented Nov 9, 2016

What is your indended use case for this implementation? Dispatching router actions through the library?

Since ng2-redux prefers the use of injectables as action creators instead of plain javascript objects, I figured most people would just inject the router in the injectable actions and send commands directly through it, instead of going through my library. But maybe your use case is different and your need to dispatch an action directly through this library?

@rafabernad
Copy link
Author

Yeah, exactly that.

Of course, you can always inject the router and dispatch route changes throught it, but think it doesn't hurt enabling your library to receive actions with options on it.

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