I have a base controller and controllers that I would like to inherit the base controllers variable and functions. But I'm have trouble inhering 'vm' varand the functions.
How do I pass the vm for the other controllers to
BaseController.js
angular
.module('app')
.controller('Base', function($scope){
var vm = this;
$scope.test1 = "this is a test";
vm.test2 = 'this is a second test";
});
FirstController.js
angular
.modlue('app')
.controller('firstCtrl', function($scope, $controller){
$controller('Base', { $scope: $scope });
console.log($scope);
});