Skip to content

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

Closed
@mgonto

Description

@mgonto

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions