This question might seem as if it was asked before but I can't find solution anywhere.
I have directive to which i pass array
<div modal-panel
array="ctrl.array" >
</div>
and i get it in scope
scope: {
array: '=',
},
It works all good, updates, etc until I close the form and open it once again. It just doesn't update. I tried logging the contents of an array to console and it is just the old array from the time i first opened the form containing that directive. I tired doing things like
$scope.$on('$destroy', () => {
$scope.array = null
});
but it just doesnt work. Any ideas appreciated
I found that the problem exists only in callback that i have to check all checkboxes in ng-table containing that array.
Is there a way to update data in a callback when this happens?
I found the problem.
The directive was'nt rebuilt cause of my spa app and list of callbacks wasn't updated so there was one callback with old reference. I just deleted old callback and added new with actual reference.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments