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

Function cachedToggleClass

test/angular/1.5/angular.js:29045–29053  ·  view source on GitHub ↗
(className, switchValue)

Source from the content-addressed store, hash-verified

29043 }
29044
29045 function cachedToggleClass(className, switchValue) {
29046 if (switchValue && !classCache[className]) {
29047 $animate.addClass($element, className);
29048 classCache[className] = true;
29049 } else if (!switchValue && classCache[className]) {
29050 $animate.removeClass($element, className);
29051 classCache[className] = false;
29052 }
29053 }
29054
29055 function toggleValidationCss(validationErrorKey, isValid) {
29056 validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';

Callers 2

setValidityFunction · 0.70
toggleValidationCssFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected