MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / parseConstantExpr

Function parseConstantExpr

web/static/bower_components/angular/angular.js:22001–22012  ·  view source on GitHub ↗
($parse, context, name, expression, fallback)

Source from the content-addressed store, hash-verified

21999}
22000
22001function parseConstantExpr($parse, context, name, expression, fallback) {
22002 var parseFn;
22003 if (isDefined(expression)) {
22004 parseFn = $parse(expression);
22005 if (!parseFn.constant) {
22006 throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
22007 '`{1}`.', name, expression);
22008 }
22009 return parseFn(context);
22010 }
22011 return fallback;
22012}
22013
22014function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
22015 var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);

Callers 1

checkboxInputTypeFunction · 0.85

Calls 1

isDefinedFunction · 0.85

Tested by

no test coverage detected