MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / parseConstantExpr

Function parseConstantExpr

code/songhop/www/lib/angular/angular.js:19905–19916  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

19903}
19904
19905function parseConstantExpr($parse, context, name, expression, fallback) {
19906 var parseFn;
19907 if (isDefined(expression)) {
19908 parseFn = $parse(expression);
19909 if (!parseFn.constant) {
19910 throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' +
19911 '`{1}`.', name, expression);
19912 }
19913 return parseFn(context);
19914 }
19915 return fallback;
19916}
19917
19918function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
19919 var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);

Callers 1

checkboxInputTypeFunction · 0.70

Calls 2

isDefinedFunction · 0.70
minErrFunction · 0.70

Tested by

no test coverage detected