This repository has been archived on 2022-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
AriaNg/app/scripts/directives/placeholder.js
2016-06-10 20:29:57 +08:00

18 lines
451 B
JavaScript

(function () {
'use strict';
angular.module("ariaNg").directive('ngPlaceholder', function () {
return {
restrict: 'A',
scope: {
placeholder: '=ngPlaceholder'
},
link: function (scope, elem) {
scope.$watch('placeholder', function () {
elem[0].placeholder = scope.placeholder;
});
}
};
});
})();