I have not looked into ng-grid source, but I've seen similar behavior with 
kendo widgets. 
When a widget is created, it binds to an object provided by your 
controller. In your case it seems to be $scope.myData[0]. 
When you change this exact object, the widget reflects the change. But if 
you reassign the reference $scope.myData[0] to a new object, the widget 
does not know about it. 
It is also a common pattern happening when you initialize a scope variable 
from a service, and then service changes that value vs. replaces the whole 
service property. 

On Thursday, May 29, 2014 8:56:45 PM UTC-7, johntom wrote:
>
> Not sure why but the following works
>    $scope.myData[0].delete ; 
>  
>   $scope.myData[0] = {name: "aaaaa", age: 55};
>   $scope.myData.push({name: "ccc", age: 34});
>
> On Thursday, May 29, 2014 5:21:47 AM UTC-4, zhou wrote:
>>
>> http://plnkr.co/edit/7QhluNzJXb7nhcpv8nQE?p=preview
>>
>> on this example, 
>>
>> line 12 is work, but line 13 dosen't
>>
>> why
>>
>

-- 
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.

Reply via email to