how to tell angularjs to stop watching an expired data object and force controllers to restart to look at a new model instance ?
var ang = angular.module('ang', []);
ang.controller('userCtrl', function($scope) {
$scope.userData = myProject.getUserData(); // an OOP js data tree
}
angular.bootstrap(document, ['ang']);
// ...
myProject.reloadUserData(); // userData now a new instance
Angular works perfectly until I destroy the user data object to create a new data object instance.
How to tell angular to stop watching the old user data and start looking the new ? Basically I want to restart angular or the controllers.