($parse, context, name, expression, fallback)
| 26172 | } |
| 26173 | |
| 26174 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 26175 | var parseFn; |
| 26176 | if (isDefined(expression)) { |
| 26177 | parseFn = $parse(expression); |
| 26178 | if (!parseFn.constant) { |
| 26179 | throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 26180 | '`{1}`.', name, expression); |
| 26181 | } |
| 26182 | return parseFn(context); |
| 26183 | } |
| 26184 | return fallback; |
| 26185 | } |
| 26186 | |
| 26187 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 26188 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected