Well, I have this situation:
$stateProvider
.state("main", { abtract: true, url:"/main",
views: {
"viewA": {
templateUrl:"main.html"
}
}
})
.state("other", {
parent: ':foo', // Want here the foo param too (:
//url: '/:foo', // Here it takes de foo param
views: {
"viewB@main": {
templateUrl:"hello.html"
}
},
controller: function($stateParams, $scope, $state) {
var foo = $stateParams.foo;
}
})
And I call it, like this:
<button ui-sref="other({foo: 'main'})">Hello World</button>
It is possible to have the 'foo'
param in the 'parent'
property like it was it the 'url'
param?