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

Function parseConstantExpr

lib/test/angular/1.7.0/angular.js:26329–26340  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

26327}
26328
26329function parseConstantExpr($parse, context, name, expression, fallback) {
26330 var parseFn;
26331 if (isDefined(expression)) {
26332 parseFn = $parse(expression);
26333 if (!parseFn.constant) {
26334 throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
26335 '`{1}`.', name, expression);
26336 }
26337 return parseFn(context);
26338 }
26339 return fallback;
26340}
26341
26342function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
26343 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