Skip to content

Inherit params if from and to state in transition share parameters #230

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

Closed
mgonto opened this issue Jul 5, 2013 · 2 comments
Closed

Inherit params if from and to state in transition share parameters #230

mgonto opened this issue Jul 5, 2013 · 2 comments

Comments

@mgonto
Copy link

mgonto commented Jul 5, 2013

Hey,

Let's say the following example for states.

$stateProvider
                .state('main', {
                    url: '/accounts/:accountId/messaging-center',
                    templateUrl: '/js/frontend/app/mescenter/controllers/main/main.html',
                    abstract: true
                })
                .state('main.alerts', {
                    url: '/alerts',
                })
                .state('main.newsfeed', {
                    url: '/news-feed',
                });

In this case, when I'm on state "alerts" as this was the default url (/accounts/123/messaging-center/alerts) and I want to transition to newsfeed, as they share the same parent, I think that the accountId parameter should by default by forwarded in the transition.

Right now, when moving from alerts to newsfeed, I need to manually forward all the parameters from the parent (In this case accountId only).

What do you think?

@nateabele
Copy link
Contributor

You'll be glad to know that I am currently working on this, but in the context of #15, of which is a duplicate.

@mgonto
Copy link
Author

mgonto commented Jul 5, 2013

You'll be glad to know that I am currently working on this, but in the context of #15, of which is a duplicate.

That's awesome!

Thanks!

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

No branches or pull requests

2 participants