When I extend a controller in angular, is there any way to call a function on the "superclass" controller from a "subclass" function that overrides it?
For clarity - in Java I'd do:
class Foo {
void doStuff(){
//do stuff
}
}
class FooBar extends Foo {
void doStuff(){
super.doStuff();
//do more stuff
}
}
and I'd like to do the equivalent in angular - something
myApp.controller('FooCtrl', function($scope){
$scope.doStuff = function(){
//do stuff
}
}).controller('FooBarCtrl', function($scope){
angular.extend(this, $controller('FooCtrl', {$scope: $scope}));
$scope.doStuff = function(){
// ??? <- INSERT ANSWER HERE
//do more stuff
}
}