($parse, context, name, expression, fallback)
| 25791 | } |
| 25792 | |
| 25793 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 25794 | var parseFn; |
| 25795 | if (isDefined(expression)) { |
| 25796 | parseFn = $parse(expression); |
| 25797 | if (!parseFn.constant) { |
| 25798 | throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 25799 | '`{1}`.', name, expression); |
| 25800 | } |
| 25801 | return parseFn(context); |
| 25802 | } |
| 25803 | return fallback; |
| 25804 | } |
| 25805 | |
| 25806 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 25807 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected