javascript - How to watch whole array of objects? -


this question has answer here:

i have array of ten objects. each 1 of them contains 6 properties , display on view. user able change properties typing new data on inputs. how can watch whole array , identify property on object has been changed , don't repeat code 10 times in order watch each object separately?

you can use $watchcollection

$scope.$watchcollection('data', function (newval, oldval) { /*...*/ }); 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -