Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-model, ng-change attributes are getting applied to <span> not <input> #3

Open
jimishio opened this issue Aug 19, 2015 · 3 comments

Comments

@jimishio
Copy link

Hey @cesardeazevedo,
I have been using this ngInput tag for my form elements in my angular application.

Now issue is when I apply any ng-model or ng-change properties/attributes to tag, It gets applied to element which is getting created by ng-input.js.

For any change or for getting any value from input box, I need to refer to that particular ng-model value and I need ng-change function as input value gets changed some behaviour should be changed too.

I tried editing ng-input.js but I came accross more errors, which I am not able to solve right now.

Please help.

@cesardeazevedo
Copy link
Owner

They are copied to input and remains to spans.
There's a button on the first theme at demo page, take a look http://cesardeazevedo.github.io/ng-input/

and which angular version you're using?

@jimishio
Copy link
Author

yeah I saw that button. But somehow ng-model, ng-change are going to span tag only. even properties like maxlength (I don't know if you support this or not) are going to span tag only.

I am using 1.4.0 version of angular.

@cesardeazevedo
Copy link
Owner

It supports only this properties https://docs.angularjs.org/api/ng/directive/input from angular input docs.

This is wierd because the input tag is already defined with all default properties, which is a reference from properties defined in the ng-input tag, see the code https://github.com/cesardeazevedo/ng-input/blob/master/src/ng-input.html#L2-L12

i've seen some problems with ng-change, that i'm taking a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants