MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / recordChanges

Function recordChanges

lib/test/angular/1.7.0/angular.js:10847–10866  ·  view source on GitHub ↗
(key, currentValue, previousValue)

Source from the content-addressed store, hash-verified

10845 });
10846
10847 function recordChanges(key, currentValue, previousValue) {
10848 if (isFunction(destination.$onChanges) && !simpleCompare(currentValue, previousValue)) {
10849 // If we have not already scheduled the top level onChangesQueue handler then do so now
10850 if (!onChangesQueue) {
10851 scope.$$postDigest(flushOnChangesQueue);
10852 onChangesQueue = [];
10853 }
10854 // If we have not already queued a trigger of onChanges for this controller then do so now
10855 if (!changes) {
10856 changes = {};
10857 onChangesQueue.push(triggerOnChangesHook);
10858 }
10859 // If the has been a change on this property already then we need to reuse the previous value
10860 if (changes[key]) {
10861 previousValue = changes[key].previousValue;
10862 }
10863 // Store this change
10864 changes[key] = new SimpleChange(previousValue, currentValue);
10865 }
10866 }
10867
10868 function triggerOnChangesHook() {
10869 destination.$onChanges(changes);

Callers 1

Calls 2

isFunctionFunction · 0.70
simpleCompareFunction · 0.70

Tested by

no test coverage detected