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

Function toggleValidCss

test/angular/1.2/angular.js:16334–16339  ·  view source on GitHub ↗
(isValid, validationErrorKey)

Source from the content-addressed store, hash-verified

16332
16333 // convenience method for easy toggling of classes
16334 function toggleValidCss(isValid, validationErrorKey) {
16335 validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
16336 $animate.setClass(element,
16337 (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey,
16338 (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);
16339 }
16340
16341 /**
16342 * @ngdoc method

Callers 2

FormControllerFunction · 0.85
angular.jsFile · 0.85

Calls 1

snake_caseFunction · 0.70

Tested by

no test coverage detected