Question

Is there any drop in directive in angular js to support placeholder in IE 8 and IE 9. There are a bunch of libs that I found but all of them had jQuery dependency. Need to achieve it without jQuery dependency!

Was it helpful?

Solution

I managed to create a custom placeholder directive to handle it without any jQuery dependency.

OTHER TIPS

I was trying to implement placeholder attributes for older browsers in an application my company was developing using our own custom placeholder directive without Jquery such as yours.

It was giving us some trouble because everytime it would just suddenly stop from working and the placeholder was taking too long to appear when using IE8/ IE9.

Then I found this guy and it works beautifully:

https://github.com/cvn/angular-shims-placeholder

Maybe you can use http://modernizr.com/ to check for placeholder suppport.

if (!Modernizr.input.placeholder) { ... }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top