When I replace an object that contains a property that is being watched with another instance of that object... AngularJS seems to lose the reference to that property... which I can understand... but what is a good way to reconnect that members property in, say, an ng-repeat directive. For example...
HTML
<div ng-repeat="portfolio in data.portfolios">
{{ portfolio.name }}
<div>
JS
$scope.data = {};
$scope.data.portfolios = [
{ Name: "aaa" },
{ Name: "bbb" }
];
$scope.portfoliosService.loadPortfolios(clientId, true, true)
.success(function (response) {
$scope.data = response.data;
});
Note: response.data contains an array called portfolios.