MCPcopy Index your code
hub / github.com/angular-ui/ui-router / ngClassWatchAction

Function ngClassWatchAction

test/angular/1.5/angular.js:25690–25706  ·  view source on GitHub ↗
(newVal)

Source from the content-addressed store, hash-verified

25688 }
25689
25690 function ngClassWatchAction(newVal) {
25691 // eslint-disable-next-line no-bitwise
25692 if (selector === true || (scope.$index & 1) === selector) {
25693 var newClasses = arrayClasses(newVal || []);
25694 if (!oldVal) {
25695 addClasses(newClasses);
25696 } else if (!equals(newVal,oldVal)) {
25697 var oldClasses = arrayClasses(oldVal);
25698 updateClasses(oldClasses, newClasses);
25699 }
25700 }
25701 if (isArray(newVal)) {
25702 oldVal = newVal.map(function(v) { return shallowCopy(v); });
25703 } else {
25704 oldVal = shallowCopy(newVal);
25705 }
25706 }
25707 }
25708 };
25709

Callers 1

classDirectiveFunction · 0.70

Calls 6

isArrayFunction · 0.85
arrayClassesFunction · 0.70
addClassesFunction · 0.70
equalsFunction · 0.70
updateClassesFunction · 0.70
shallowCopyFunction · 0.70

Tested by

no test coverage detected