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

Function ngClassWatchAction

test/angular/1.4/angular.js:23215–23230  ·  view source on GitHub ↗
(newVal)

Source from the content-addressed store, hash-verified

23213 }
23214
23215 function ngClassWatchAction(newVal) {
23216 if (selector === true || scope.$index % 2 === selector) {
23217 var newClasses = arrayClasses(newVal || []);
23218 if (!oldVal) {
23219 addClasses(newClasses);
23220 } else if (!equals(newVal,oldVal)) {
23221 var oldClasses = arrayClasses(oldVal);
23222 updateClasses(oldClasses, newClasses);
23223 }
23224 }
23225 if (isArray(newVal)) {
23226 oldVal = newVal.map(function(v) { return shallowCopy(v); });
23227 } else {
23228 oldVal = shallowCopy(newVal);
23229 }
23230 }
23231 }
23232 };
23233

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