I am struggling to implement angular ui-router in my project. The views are not displaying as expected. Can anyone provide assistance? Here is a list of the files involved:
app.js, index.html, home.html, leftTree.html, topBar.html, ihome.html, footer.html
angular.module('agentApp', ['ngCookies', 'ui.router', 'agentApp.controllers', 'agentApp.directives', 'agentapp.filters', 'agentApp.services'])
.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/");
$stateProvider
.state('index', {
url: '/',
templateUrl: 'tpls/home.html'
})
.state('index.home', {
url:'/home',
views: {
"leftTree": {
templateUrl: "tpls/leftTree.html"
},
"topBar": {
templateUrl: "tpls/topBar.html"
},
"ihome": {
template: "tpls/ihome.html"
},
"footer": {
templateUrl: "tpls/footer.html"
}
}
})
}])
index.html
Add your unique content here.
home.html
Add your unique content here.
leftTree.html
Add your unique content here.
topBar.html
Add your unique content here.
ihome.html
Add your unique content here.
footer.html
Add your unique content here.
The attach file is I want the content display place enter image description here