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

Function parseConstantExpr

lib/test/angular/1.4.3/angular.js:21779–21790  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

21777}
21778
21779function parseConstantExpr($parse, context, name, expression, fallback) {
21780 var parseFn;
21781 if (isDefined(expression)) {
21782 parseFn = $parse(expression);
21783 if (!parseFn.constant) {
21784 throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' +
21785 '`{1}`.', name, expression);
21786 }
21787 return parseFn(context);
21788 }
21789 return fallback;
21790}
21791
21792function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
21793 var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);

Callers 1

checkboxInputTypeFunction · 0.70

Calls 3

isDefinedFunction · 0.70
minErrFunction · 0.70
$parseFunction · 0.50

Tested by

no test coverage detected