I'm trying to create a SPA using the UI-Router's multiple views functionality but cannot figure it out why my sections are not displayed into the page.
Here's my app setup:
angular
.module('myApp', [
'ngAnimate',
'ngCookies',
'ngResource',
'ngRoute',
'ui-router'
'ngSanitize',
'ngTouch'
])
.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
$urlRouterProvider.otherwise('/main');
$stateProvider
.state('/', {
url: 'main',
views: {
'v1': {
templateUrl: 'views/v1.html',
controller: 'V1Ctrl'
},
'v2': {
templateUrl: 'views/v2.html',
controller: 'V2Ctrl'
},
'v3': {
templateUrl: 'views/v3.html',
controller: 'V3Ctrl'
},
'v4': {
templateUrl: 'views/V4.html',
controller: 'V4Ctrl'
},
'v5': {
templateUrl: 'views/v5.html',
controller: 'V5Ctrl'
},
'V6': {
templateUrl: 'views/V6.html',
controller: 'V6Ctrl'
}
}
});
$locationProvider.html5Mode(true);
});
And on my main.html:
<section ui-view="v1" id="v1"></section>
<section ui-view="v2" id="v2 ></section>
<section ui-view="v3" id="v3" ></section>
<section ui-view="v4" id="v4" ></section>
<section ui-view="v5" id="v5" ></section>
<section id="v6" ui-view="v6" ></section>
I've been stuck on this issue for days and cannot find an explanation.