indeterminate.js 514 B

1234567891011121314151617
  1. (function () {
  2. 'use strict';
  3. angular.module('ariaNg').directive('ngIndeterminate', function () {
  4. return {
  5. restrict: 'A',
  6. scope: {
  7. indeterminate: '=ngIndeterminate'
  8. },
  9. link: function (scope, element) {
  10. scope.$watch('indeterminate', function () {
  11. element[0].indeterminate = (scope.indeterminate === 'true' || scope.indeterminate === true);
  12. });
  13. }
  14. };
  15. });
  16. }());