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

Function parseConstantExpr

test/angular/1.6/angular.js:26174–26185  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

26172}
26173
26174function parseConstantExpr($parse, context, name, expression, fallback) {
26175 var parseFn;
26176 if (isDefined(expression)) {
26177 parseFn = $parse(expression);
26178 if (!parseFn.constant) {
26179 throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
26180 '`{1}`.', name, expression);
26181 }
26182 return parseFn(context);
26183 }
26184 return fallback;
26185}
26186
26187function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
26188 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