Answer the question
In order to leave comments, you need to log in
How to open different templates depending on angular setting?
There is a route
.state('app.catID', {
url: '/catid/:catID',
views: {
'menuContent': {
templateUrl: 'templates/category.html',
controller: 'catCtrl'
},
'filterView': {
templateUrl: 'templates/filter.html',
controller: 'filCtrl'
},
'sideView': {
templateUrl: 'templates/category/category_dynamic.html',
controller: 'categoryMenuCtrl'
}
}
})
Answer the question
In order to leave comments, you need to log in
angular-ui.github.io/ui-router/site/#/api/ui.route...
filterView: {
templateUrl: function (params) {
return 'templates/filter' + params.catID + '.html';
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question