cvn / angular-shims-placeholder

Angular directive to emulate the placeholder attribute on text and password input fields for old browsers, such as IE9, IE8, and IE7. Also works on textareas and html5 input types.
MIT License
63 stars 26 forks source link

DI support #24

Closed gilsmdt closed 9 years ago

gilsmdt commented 9 years ago

Hi,

Can you please update the code to be DI compatible? You need to prefix the directive definition like so .directive('placeholder',['$timeout', '$document', '$interpolate', '$injector', 'placeholderSniffer', function($timeout, $document, $interpolate, $injector, placeholderSniffer) {

don't foget to add the ] at the end of the function :)

cvn commented 9 years ago

Check the dist folder.

On Jun 2, 2015, at 01:34, gilsmdt notifications@github.com wrote:

Hi,

Can you please update the code to be DI compatible? You need to prefix the directive definition like so .directive('placeholder',['$timeout', '$document', '$interpolate', '$injector', 'placeholderSniffer', function($timeout, $document, $interpolate, $injector, placeholderSniffer) {

don't foget to add the ] at the end of the function :)

— Reply to this email directly or view it on GitHub.

cvn commented 9 years ago

Here's a little more detail, for the people of the future. The source (lib/) uses the "implicit annotation" style, and then during the build process, ngmin transforms this into the minification-safe "inline array annotation" style that you've requested, and saves the result in the dist/ folder.