($parse, context, name, expression, fallback)
| 21777 | } |
| 21778 | |
| 21779 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 21780 | var parseFn; |
| 21781 | if (isDefined(expression)) { |
| 21782 | parseFn = $parse(expression); |
| 21783 | if (!parseFn.constant) { |
| 21784 | throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 21785 | '`{1}`.', name, expression); |
| 21786 | } |
| 21787 | return parseFn(context); |
| 21788 | } |
| 21789 | return fallback; |
| 21790 | } |
| 21791 | |
| 21792 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 21793 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected