Pankaj,
If you read through the SO answers, there is a pretty clear explanation why
the track by $index is not suited for what
you are trying to do. The last answer tells you exactly what and why it is
happening in your code.
At least you need to put an unique id in appliedgrids, and track on that id.
Also you use a sort of one-time bindings in your directive. Those will also
not get updated if you change anything.
meaning, this code:
$scope.gridIndex = $parse($attrs.gridIndex)($scope);
$scope.gridValues=$parse($attrs.appliedgrid)($scope);
$scope.gridParent=$parse($attrs.appliedgrids)($scope);
and this:
$scope.span = $parse($attrs.span)($scope);
$scope.columnIndex = $parse($attrs.columnIndex)($scope);
$scope.columnWidgets=$scope.gridValues[$scope.columnIndex].data;
runs only once, and those things will not update ever again!
Regards
Sander
--
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.