($parse, context, name, expression, fallback)
| 22548 | } |
| 22549 | |
| 22550 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 22551 | var parseFn; |
| 22552 | if (isDefined(expression)) { |
| 22553 | parseFn = $parse(expression); |
| 22554 | if (!parseFn.constant) { |
| 22555 | throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 22556 | '`{1}`.', name, expression); |
| 22557 | } |
| 22558 | return parseFn(context); |
| 22559 | } |
| 22560 | return fallback; |
| 22561 | } |
| 22562 | |
| 22563 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 22564 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected