Is it possible to call a function on the superclass controller when extending a controller in Angular and overriding a function?
To illustrate with an example in Java:
class Foo {
void doStuff(){
//do stuff
}
}
class FooBar extends Foo {
void doStuff(){
super.doStuff();
//do more stuff
}
}
I am looking for a way to achieve something similar in Angular, like this:
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
}
}