($parse, context, name, expression, fallback)
| 19903 | } |
| 19904 | |
| 19905 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 19906 | var parseFn; |
| 19907 | if (isDefined(expression)) { |
| 19908 | parseFn = $parse(expression); |
| 19909 | if (!parseFn.constant) { |
| 19910 | throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 19911 | '`{1}`.', name, expression); |
| 19912 | } |
| 19913 | return parseFn(context); |
| 19914 | } |
| 19915 | return fallback; |
| 19916 | } |
| 19917 | |
| 19918 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 19919 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected