question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing state parameters inside redirectTo

See original GitHub issue

Hello,

First at all, I’m github newbee, and I never contributed to an OpenSource project, so please be kind with me 😃.

I would love to be able to write something like redirectTo: 'login({origin:"dashboard"})' in the state definition, or at least be able to specify my own state parameters. Using the same syntax that ui-sref would be very handy.

But looking at permission source code i see that it is currently not possible and more importantly, i see that the toParams of the PermissionMap are used as state parameters for the redirect. Is there any particular reason to send toParams during the redirect ?

I gave a look at ui-router’s source code to see how they parse ui-sref expressions and it seems pretty straightforward. Would you like such a contribution to the project ? My proposition is simply to be able to specify the state like it is done is ui-sref, and i can implement it.

Have a good day !!!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
masterspambotcommented, Mar 12, 2016

Done.

0reactions
masterspambotcommented, Mar 22, 2016

Implemented in v2.2.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing state in Redirect - reactjs - Stack Overflow
I'm trying to make it so that when you login, you go to the home page. But when you type in a URL...
Read more >
How to pass additional data while redirecting to a route in React
In this article, we will see how we can pass extra data while redirecting to a different route. So let's get started. Using...
Read more >
Redirecting Users with State Parameters - Auth0 Community
Hello,. I'm trying to redirect my users after login/signup in a React app. I've been reading about how to do that using a...
Read more >
$route redirectTo Will Pass-Through Current Route Params In ...
Ben Nadel demonstrates that the redirectTo action, in AngularJS routing, will automatically pass named parameters from the current route to ...
Read more >
9 Interesting Ways to Pass Data through Angular RouterState.
Query parameters are set using queryParams in Router. navigate. Multiple query parameters can be passed by passing them as comma-separated parameters along with ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found