0

I've got an AngularJS project using ui-router where we've setup a state with two side-by-side views:

$stateProvider
    .state('side-by-side', {url: '/side-by-side', views: {
        'listView': { templateUrl: 'list.html', controller: 'ListView' },
        'detailView': { templateUrl: 'detail.html', controller: 'DetailController'}
    }});

Now my detail.html file also contains a ui-view item called 'detailPage' that I would like to populate on a nested state of side-by-side, call it side-by-side.item. I'm not quite sure how to do this. I've tried the following:

.state('side-by-side.item', {url: /side-by-side/{itemId}/{pageId}, views: {
    'detailPage@detailView': {templateUrl: 'detailPage.html', controller: 'PageController'}
}});

but this doesn't seem to work. Any clues?

Many thanks in advance,

Joseph.

1 Answer 1

0

Can you try one of the following

.state('side-by-side.item', {url: /side-by-side/{itemId}/{pageId}, views: {
    '[email protected]': {templateUrl: 'detailPage.html', controller: 'PageController'}
}});

or

.state('side-by-side.item', {url: /side-by-side/{itemId}/{pageId}, views: {
    'detailPage@side-by-side': {templateUrl: 'detailPage.html', controller: 'PageController'}
}});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.