MCPcopy
hub / github.com/jquery/esprima / ngClassWatchAction

Function ngClassWatchAction

test/3rdparty/angular-1.2.5.js:17137–17147  ·  view source on GitHub ↗
(newVal)

Source from the content-addressed store, hash-verified

17135
17136
17137 function ngClassWatchAction(newVal) {
17138 if (selector === true || scope.$index % 2 === selector) {
17139 var newClasses = flattenClasses(newVal || '');
17140 if(!oldVal) {
17141 attr.$addClass(newClasses);
17142 } else if(!equals(newVal,oldVal)) {
17143 attr.$updateClass(newClasses, flattenClasses(oldVal));
17144 }
17145 }
17146 oldVal = copy(newVal);
17147 }
17148
17149
17150 function flattenClasses(classVal) {

Callers 1

classDirectiveFunction · 0.85

Calls 3

flattenClassesFunction · 0.85
equalsFunction · 0.85
copyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…