-
Notifications
You must be signed in to change notification settings - Fork 47
Add href property to the router state object
#51
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
Conversation
3021d20 to
b0a6956
Compare
|
Hi @rufman! Sorry it's taken so long to get around to this. Really appreciate your contribution but the owner of the repo hasn't been able to find the time to maintain the repo so much and I've said I will try and help bring things up to speed. Is this still a need for you? I'm keen to fully understand the use case, I think I've got it but if you want to elaborate a little that would be awesome. As we've let this drag on a bit there are now merge conflicts as we've recently merged a PR for ui router 1.0 beta support. Do you want to resubmit a PR that isn't so far behind? Then I can merge your commits rather than replicating your contribution myself. It would be cool to add you to the contributor list... Thanks again! |
|
@hally9k Yeah I'll take a look at it this weekend |
|
@hally9k I've rebased my downstream repo with the changes |
|
Hi @rufman, |
|
@rufman ah ha! Sorry, I totally should have gone and had a look and got my facts straight. RTFM and all that... I've been throwing the little snippets of spare time I can find into this project so sometimes I'm a little bit too rushed to do things due diligence. I read the docs on href and now actually understand your use case properly. Apologies for messing you around with this :/ . The PR that conflicts is merged into master now if you want to take a look? It's still just a one liner |
Adding `href` to the router state object gives access to the `$state.href` function in React code. This allows the creation of urls for states, which is critical when a component links to another part of the app and should be crawlable by a crawler.
Include `href` payload key in tests
* Support for angular-ui-router 1.0.0-beta.1 (#64) * Support to ui-router 1.0.0-beta.1 - onStateNotFound action was removed - evt parameter was removed from onStateChangeStart and onStateChangeError - example using redux-devtools * The router listener was simplified * fixed incorrect params being passed in router middleware on STATE_CHANGE_SUCCESS * fix #66 missing parameters passed on transition onStart. Add tests for router-listener (#67) * Fixed the prev state and params in the redux router state getting set… (#68) * Fixed the prev state and params in the redux router state getting set to the current state and params by changing the way that the STATE_CHANGE_SUCCESS handler in the middleware accesses the previous state and params. * added options to the state change start action payload for middle wares etc. * Add `href` property to the router state object (#51) * Add `href` property to the router state object Adding `href` to the router state object gives access to the `$state.href` function in React code. This allows the creation of urls for states, which is critical when a component links to another part of the app and should be crawlable by a crawler. * Update licenser test Include `href` payload key in tests * Fix tests and lint (#70) * Fix tests for `onStart` and `onError` Adds a stub for the new options param added in commit 994b8d0 * Fix lint error * Restrict to node v6 and higher (#75) * Added MIT license (#79) * Added stateChangeFinish action to ensure state changes are set in the… (#80) * Added stateChangeFinish action to ensure state changes are set in the app state before components are instantiated * added and fixed tests * updated ui-router to 1.0-beta.3 * missing test * fixed test * upgraded ui-router to 1.0.0-rc1 and fixed node engine bug * upgraded ui-router to 1.0.0-rc1 and fixed node engine bug * 0.7.0-rc.1 * Expose state activation actions as injectable factory (#81) * Expose state activation actions as a factory * Integrate default state activation actions wrap state activation actions into factory * Create state-activation-actions.test.js * Update function name * added the state activation actions as injectable factory * 0.7.1-rc.1 * Fixed up example * bumped patch release * Upgraded to new ui-router package name
Adding
hrefto the router state object gives access to the$state.hreffunction in React code. This allows the creationof urls for states, which is critical when a component links to
another part of the app and should be crawlable by a crawler.