Skip to content

Angular directive to make the input/textarea placeholder attribute work on all browsers.

Notifications You must be signed in to change notification settings

davejhilton/angular-placeholder-shim

 
 

Repository files navigation

angular-placeholder-shim

Angular directive to make the input/textarea placeholder attribute work on all browsers. Uses the jquery-html5-placeholder-shim.

Copyright (C) 2013, Uri Shaked [email protected].

Build Status

Usage

Include both jquery.html5-placeholder-shim.js and angular-placeholder-shim.js in your application. You will also need to have jQuery in your project.

<script src="components/jquery-html5-placeholder-shim/jquery.html5-placeholder-shim.js"></script>
<script src="components/angular-placeholder-shim/angular-placeholder-shim.js"></script>

Add the module placeholderShim as a dependency to your app module:

var myapp = angular.module('myapp', ['placeholderShim']);

That's all. Now your will be able to see your placeholders even on IE9.

<input type="text" name="email" placeholder="Enter your email" />

You can even have an Angular expression as the placeholder

<input type="text" placeholder="{{5*5}}" />

License

Released under the terms of MIT License.

About

Angular directive to make the input/textarea placeholder attribute work on all browsers.

Resources

Stars

Watchers

Forks

Packages

No packages published