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

Function recordChanges

lib/test/angular/1.6.7/angular.js:10758–10777  ·  view source on GitHub ↗
(key, currentValue, previousValue)

Source from the content-addressed store, hash-verified

10756 });
10757
10758 function recordChanges(key, currentValue, previousValue) {
10759 if (isFunction(destination.$onChanges) && !simpleCompare(currentValue, previousValue)) {
10760 // If we have not already scheduled the top level onChangesQueue handler then do so now
10761 if (!onChangesQueue) {
10762 scope.$$postDigest(flushOnChangesQueue);
10763 onChangesQueue = [];
10764 }
10765 // If we have not already queued a trigger of onChanges for this controller then do so now
10766 if (!changes) {
10767 changes = {};
10768 onChangesQueue.push(triggerOnChangesHook);
10769 }
10770 // If the has been a change on this property already then we need to reuse the previous value
10771 if (changes[key]) {
10772 previousValue = changes[key].previousValue;
10773 }
10774 // Store this change
10775 changes[key] = new SimpleChange(previousValue, currentValue);
10776 }
10777 }
10778
10779 function triggerOnChangesHook() {
10780 destination.$onChanges(changes);

Callers 1

Calls 2

isFunctionFunction · 0.70
simpleCompareFunction · 0.70

Tested by

no test coverage detected