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

Function parseConstantExpr

test/angular/1.4/angular.js:22550–22561  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

22548}
22549
22550function parseConstantExpr($parse, context, name, expression, fallback) {
22551 var parseFn;
22552 if (isDefined(expression)) {
22553 parseFn = $parse(expression);
22554 if (!parseFn.constant) {
22555 throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
22556 '`{1}`.', name, expression);
22557 }
22558 return parseFn(context);
22559 }
22560 return fallback;
22561}
22562
22563function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
22564 var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);

Callers 1

checkboxInputTypeFunction · 0.70

Calls 2

isDefinedFunction · 0.70
$parseFunction · 0.70

Tested by

no test coverage detected