($parse, context, name, expression, fallback)
| 27164 | } |
| 27165 | |
| 27166 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 27167 | var parseFn; |
| 27168 | if (isDefined(expression)) { |
| 27169 | parseFn = $parse(expression); |
| 27170 | if (!parseFn.constant) { |
| 27171 | throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 27172 | '`{1}`.', name, expression); |
| 27173 | } |
| 27174 | return parseFn(context); |
| 27175 | } |
| 27176 | return fallback; |
| 27177 | } |
| 27178 | |
| 27179 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 27180 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected