($parse, context, name, expression, fallback)
| 24996 | } |
| 24997 | |
| 24998 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 24999 | var parseFn; |
| 25000 | if (isDefined(expression)) { |
| 25001 | parseFn = $parse(expression); |
| 25002 | if (!parseFn.constant) { |
| 25003 | throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 25004 | '`{1}`.', name, expression); |
| 25005 | } |
| 25006 | return parseFn(context); |
| 25007 | } |
| 25008 | return fallback; |
| 25009 | } |
| 25010 | |
| 25011 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 25012 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected