angularjs ui-router parent state -
using angularjs , ui-router can i:
a.) define custom variables when defining state (see 'data' below). success, wanted make sure proper.
.state('parent', {url:'/parent', templateurl: 'views/parent.html', abstract: true, data: {stuff: 'stuff'}})
b.) have child state inherit variable data ( how? )
.state('parent.child', {url:'/child', templateurl: 'views/parent.child.html', data: parent.data})
?
you don't specify "data" child state, inherited parent/abstracted state. access :
$state.current.data
Comments
Post a Comment