MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / toggleValidCss

Function toggleValidCss

test/fixtures/foo.js:16143–16147  ·  view source on GitHub ↗
(isValid, validationErrorKey)

Source from the content-addressed store, hash-verified

16141
16142 // convenience method for easy toggling of classes
16143 function toggleValidCss(isValid, validationErrorKey) {
16144 validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
16145 $animate.removeClass(element, (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);
16146 $animate.addClass(element, (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
16147 }
16148
16149 /**
16150 * @ngdoc method

Callers 2

FormControllerFunction · 0.85
foo.jsFile · 0.85

Calls 1

snake_caseFunction · 0.85

Tested by

no test coverage detected