($parse, context, name, expression, fallback)
| 22996 | } |
| 22997 | |
| 22998 | function parseConstantExpr($parse, context, name, expression, fallback) { |
| 22999 | var parseFn; |
| 23000 | if (isDefined(expression)) { |
| 23001 | parseFn = $parse(expression); |
| 23002 | if (!parseFn.constant) { |
| 23003 | throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + |
| 23004 | '`{1}`.', name, expression); |
| 23005 | } |
| 23006 | return parseFn(context); |
| 23007 | } |
| 23008 | return fallback; |
| 23009 | } |
| 23010 | |
| 23011 | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { |
| 23012 | var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); |
no test coverage detected