($parse, context, name, expression, fallback)
| 21999 | } |
| 22000 | |
| 22001 | function 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 | |
| 22014 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 22015 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected