I'm probably missing some key component of Angular rendering and assignment, but I thought when a variable was updated within the scope of a controller, any areas it affects would be re-evaluated. However, it doesn't appear to work in this simple case
var myApp = angular.module('myApp',[]);
function MyCtrl($scope) {
$scope.name = 'Superhero';
$scope.specialObject = {
whoawhat: $scope.name
}
}
http://jsfiddle.net/ADukg/14138/
I expect the "specialObject.whoawhat" to update when I change "name", and I've tried it with a function as well. How do I trigger an update of the object property?