this can be solved by assigning $scope.myData to a temp var and doing
update on temp var. then assignback to scope
var data = angular.copy($scope.myData);
angular.forEach(data, function(value, key){
if(value.id==item.id){
data[key] = item;
}
});
$scope.myData = data;
On Monday, July 1, 2013 9:58:06 PM UTC+6, telagraphic wrote:
>
> How do I update the ng-grid upon it being loaded into the page? If a user
> is a admin, I want to show additional columns, but I haven't figured out
> how to update the gridOptions to reflect the changes. I know that $apply()
> is not the method I want to use to force the changes.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.