Directive to support the placeholder attribute on old browsers. No jQuery required.
- Include Angular and
placeholder.js
orplaceholder.min.js
in your page. - Add
angular-placeholder-fallback
as a dependency
angular.module('someModule', ['angular-placeholder-fallback'])
.placeholder{
color:#aaa;
}
- Doesn't require any external dependencies(except Angular doh)
- Does nothing if the browser supports placeholders
- Placeholder value doesn't get submitted in a form