(scope, element, attr, ctrl)
| 11715 | } |
| 11716 | |
| 11717 | function radioInputType(scope, element, attr, ctrl) { |
| 11718 | // make the name unique, if not defined |
| 11719 | if (isUndefined(attr.name)) { |
| 11720 | element.attr('name', nextUid()); |
| 11721 | } |
| 11722 | |
| 11723 | element.bind('click', function() { |
| 11724 | if (element[0].checked) { |
| 11725 | scope.$apply(function() { |
| 11726 | ctrl.$setViewValue(attr.value); |
| 11727 | }); |
| 11728 | } |
| 11729 | }); |
| 11730 | |
| 11731 | ctrl.$render = function() { |
| 11732 | var value = attr.value; |
| 11733 | element[0].checked = (value == ctrl.$viewValue); |
| 11734 | }; |
| 11735 | |
| 11736 | attr.$observe('value', ctrl.$render); |
| 11737 | } |
| 11738 | |
| 11739 | function checkboxInputType(scope, element, attr, ctrl) { |
| 11740 | var trueValue = attr.ngTrueValue, |
nothing calls this directly
no test coverage detected