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

Function parseConstantExpr

test/angular/1.5/angular.js:24998–25009  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

24996}
24997
24998function parseConstantExpr($parse, context, name, expression, fallback) {
24999 var parseFn;
25000 if (isDefined(expression)) {
25001 parseFn = $parse(expression);
25002 if (!parseFn.constant) {
25003 throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
25004 '`{1}`.', name, expression);
25005 }
25006 return parseFn(context);
25007 }
25008 return fallback;
25009}
25010
25011function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
25012 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