I\'m trying to figure out how controller inheritance works. I have three controllers:
var myApp = angular.module(\'app\', []);
myApp.controller(\'MainContro
If you want to overwrite name property in child scopes ,convert your primitive name property into object.
$scope.user = {};
$scope.user.name='main';
$scope.getName = function() {
return $scope.user.name;
};
And you should read https://github.com/angular/angular.js/wiki/Understanding-Scopes for detailed information.