MCPcopy
hub / github.com/angular-ui/ui-router / assertValidDirectiveName

Function assertValidDirectiveName

test/angular/1.4/angular.js:7330–7340  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

7328 }
7329
7330 function assertValidDirectiveName(name) {
7331 var letter = name.charAt(0);
7332 if (!letter || letter !== lowercase(letter)) {
7333 throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name);
7334 }
7335 if (name !== name.trim()) {
7336 throw $compileMinErr('baddir',
7337 "Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",
7338 name);
7339 }
7340 }
7341
7342 /**
7343 * @ngdoc method

Callers 1

$CompileProviderFunction · 0.70

Calls 1

lowercaseFunction · 0.70

Tested by

no test coverage detected