I have been working with angular-ui-router and trying to transition to a child of one of my abstract states from within another child of the same abstract. this diagram shows the Idea a bit better:
So where 'R' is say the module and 'blue 1' is my abstract state with a
<ui-view/>
I have the green '1' load into the view automatically. what I am having trouble with is navigating to the red '2' from a ui-sref within the green '1'. is there something I have to do in particular to jump up into the blue'1' or abstract state then load the 'red2' state?
::NOTE:: if I put the ui-sref call into the abstracts template and call it from there the statechange works.
here is my state setup in app.js:
var app = angular.module( 'app', [ 'ui.router' ] );
app.config( function( $stateProvider, $urlRouterProvider ) {
$stateProvider
.state( 'Papers', {
url: "/Papers",
abstract: true,
template: '<ui-view />'
}) // nested paper states
.state( 'Papers.home', {
url: '', // default load, no path defined
templateUrl: 'templates/views/connect/Papers.home.html',
controller: 'whitePapersController'
})
.state( 'Papers.paper1', {
url: '/paper1',
templateUrl: 'templates/views/connect/Papers.paper1.html',
controller: 'PapersController'
})
.state( 'Papers.paper2', {
url: '/paper2',
templateUrl: 'templates/views/connect/Papers.paper2.html',
controller: 'PapersController'
});
}
and here is an example of papers.home.html:
<h3>
<a ui-sref="Papers.paper1">
click me for paper 1
</a>
</h3>
<h3>
<a ui-sref="Papers.paper2">
click me for paper 2
</a>
</h3>
for whatever reason I cannot transition to the other states from within a sibling state of the abstract parent, any idea as to why?