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

Function parseConstantExpr

test/angular/1.7/angular.js:27166–27177  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

27164}
27165
27166function parseConstantExpr($parse, context, name, expression, fallback) {
27167 var parseFn;
27168 if (isDefined(expression)) {
27169 parseFn = $parse(expression);
27170 if (!parseFn.constant) {
27171 throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
27172 '`{1}`.', name, expression);
27173 }
27174 return parseFn(context);
27175 }
27176 return fallback;
27177}
27178
27179function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
27180 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