How can I pass a value to the child controller using the stateProvider
in Angular?
This is what I have so far:
$stateProvider
.state('test', {
url: '/test',
views: {
'': {
templateUrl: 'test.html',
controller: 'testCtrl',
testValue : true
}
}
})
I am trying to pass a testValue variable to the testCtrl controller from this setup. However, it doesn't seem to work as expected. Can anyone provide assistance on how to achieve this? Any help would be greatly appreciated!