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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -