For the following code sample, the params does not seem to take affect. but if I put the param as part of url then it works fine. Both are supposed to be equivalent. However putting in params generates uncaught object exception. Where am I going wrong.
$stateProvider.state('start', {
params: ['lang'],
views : {
'navbar' : {
templateUrl: function($stateParams) {
return '/static/html/' + $stateParams.lang + '/navbar.html';
}
},
'jumbotron' : {
templateUrl: function($stateParams) {
return '/static/html/' + $stateParams.lang + '/jumbotron.html';
}
},
'main_content' : {
templateUrl: function ($stateParams) {
return '/static/html/' + $stateParams.lang + '/main_content.html';
}
}
},
url: '/'
})