Skip to content

state aliases or index #1691

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
marktopper opened this issue Jan 14, 2015 · 1 comment
Closed

state aliases or index #1691

marktopper opened this issue Jan 14, 2015 · 1 comment

Comments

@marktopper
Copy link

Would it be a good feature to add state aliases or indexes.

Like making it possible to do the following:

stateHelperProvider
    .state({
        name: 'home',
        // ...
        abstract: true,
        index: 'welcome', // then it will use home.welcome as index
        children: [
            {
                name: 'welcome',
                // ...
            }
        ]
    })

Or

stateHelperProvider
    .state({
        name: 'home',
        // ...
        abstract: true,
        children: [
            {
                name: 'welcome',
                alias: 'index', // since a child state name 'index' of a abstract state will be the index, this should be able to be the index this way around
                // ...
            }
        ]
    })

Why, because maybe you don't want to have states called like something.index.index.index.
Just because you have something which can include many childs, but need a index.
And as well for the first and second index.

@christopherthielen
Copy link
Contributor

Something similar, "default substate of abstract state" is planned, but not currently implemented.

Follow #1235

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