($parse, context, name, expression, fallback)
| 27229 | } |
| 27230 | |
| 27231 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 27232 | var parseFn; |
| 27233 | if (isDefined(expression)) { |
| 27234 | parseFn = $parse(expression); |
| 27235 | if (!parseFn.constant) { |
| 27236 | throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 27237 | '`{1}`.', name, expression); |
| 27238 | } |
| 27239 | return parseFn(context); |
| 27240 | } |
| 27241 | return fallback; |
| 27242 | } |
| 27243 | |
| 27244 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 27245 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected