(scope, element, attr, ctrl)
| 17195 | } |
| 17196 | |
| 17197 | function radioInputType(scope, element, attr, ctrl) { |
| 17198 | // make the name unique, if not defined |
| 17199 | if (isUndefined(attr.name)) { |
| 17200 | element.attr('name', nextUid()); |
| 17201 | } |
| 17202 | |
| 17203 | element.on('click', function() { |
| 17204 | if (element[0].checked) { |
| 17205 | scope.$apply(function() { |
| 17206 | ctrl.$setViewValue(attr.value); |
| 17207 | }); |
| 17208 | } |
| 17209 | }); |
| 17210 | |
| 17211 | ctrl.$render = function() { |
| 17212 | var value = attr.value; |
| 17213 | element[0].checked = (value == ctrl.$viewValue); |
| 17214 | }; |
| 17215 | |
| 17216 | attr.$observe('value', ctrl.$render); |
| 17217 | } |
| 17218 | |
| 17219 | function checkboxInputType(scope, element, attr, ctrl) { |
| 17220 | var trueValue = attr.ngTrueValue, |
nothing calls this directly
no test coverage detected