angularjs - Why is my ui-router state doesn't work? -
i cannot figure out why state works first time index not in appcontainer:
$locationprovider.hashprefix('!').html5mode({ enabled: true, requirebase: false }); $stateprovider .state('app', { abstract: true, url: '', templateurl: 'appcontainer.html' }) .state('app.stateaaa', { url: 'aaa', templateurl: 'aaa.html' }) .state('app.statebbb', { url: 'bbb', templateurl: 'bbb.html' }) .state('app.stateccc', { url: 'ccc', templateurl: 'ccc.html' });
appconteiner:
<ul> <li><a ui-sref="app.stateaaa">aaa</a></li> <li><a ui-sref="app.statebbb">bbb</a></li> <li><a ui-sref="app.stateccc">ccc</a></li> </ul> <ui-view></ui-view>
have on plunker
Comments
Post a Comment