Trying to implement nested views loading inside parent views using state children, but unsure if the approach is correct.
Progress so far:
$stateProvider
.state('splash', {
url: '/splash',
templateUrl: 'system/templates/splash.html',
controller: ""
}).state('home', {
url: '/',
templateUrl: 'system/templates/home.html',
controller: ""
}).state('user', {
url: '/user/:user?',
templateUrl: 'system/templates/user.html',
controller: "userController"
}).state('user.data', {
views: {
"@vdata" : {
templateUrl: 'system/templates/user.html',
controller: "userController"
}
}
})
The parent state "user" correctly receives :user?, but when navigating through $state.transitionTo();, I receive the response of
Param values not valid for state 'user.data'. There is an unnamed view with the pattern
<div ui-view></div>
set as the parent. In the user template, there is a nested ui-view called "vdata". According to the documentation, targeting @vdata should load requested pages there.
How can I make the nested view inherit parameters from the parent view?