I\'ve set up my controllers using data-ng-controller=\"xyzController as vm\"
I have a scenario with parent / child nested controllers. I have no problem
When you are using as
syntax, like ParentController as parentCtrl
, to define a controller then to access parent scope variable in child controller use following :
var id = $scope.parentCtrl.id;
Where parentCtrl
is name of parent controller using as
syntax and id
is a variable defined in same controller.