Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="https://code.angularjs.org/1.5.8/angular.js"></script>
<div ng-app='myApp'>
<div ng-controller='parentController as vm'>
parentController: {{vm.mainRoutine()}}!
</div>
<div ng-controller='child1Controller as vm'>
child1Controller: {{vm.mainRoutine()}}!
<br>
child1Controller: {{vm.childRoutine()}}!
<br>
child1Controller: {{vm.callParentRoutine()}}!
</div>
</div>
JavaScript
var myApp = angular.module('myApp',[]);
myApp.controller('parentController', parentController);
function parentController() {
var vm = this;
vm.mainRoutine = mainRoutine;
vm.subRoutine = subRoutine;
function mainRoutine() { return vm.subRoutine(); };
function subRoutine() { return 'parent'; };
}
myApp.controller('child1Controller', child1Controller);
child1Controller.$inject = ['$controller'];
function child1Controller($controller) {
var vm = this;
var base = $controller('parentController');
angular.extend(vm, base);
//override
base.subRoutine = subRoutine;
vm.childRoutine = childRoutine;
vm.callParentRoutine = callParentRoutine;
function subRoutine() { return vm.subRoutine() + ' -> child1'; };
function childRoutine() { return 'childRoutine'; };
function callParentRoutine() { return vm.mainRoutine(); };
}