placeholder.js 457 B

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