Having two controllers, parent and child.
<div ng-controller="firstCtrl as first">
<div ng-controller="secondCtrl as second"></div>
</div>
JS:
app.controller('firstCtrl', function() {
this.func = function() {
//some code
};
});
app.controller('secondCtrl', function() {
this.parent.func(some_data);//thats what I need to do
});
Is it possible to do this without using a factory or $scope.$parent
?