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

Model value is undefined #9

Open
AlmogBaku opened this issue Dec 10, 2014 · 6 comments
Open

Model value is undefined #9

AlmogBaku opened this issue Dec 10, 2014 · 6 comments

Comments

@AlmogBaku
Copy link

I don't know why.. but the model always returning me undefined..

<input type="text" fcsa-number="{ prepend: '$' }" class="form-control" placeholder="$(Maximum)" ng-model="investor.investment_range.max" />
@eas604
Copy link

eas604 commented Sep 2, 2015

Are you using Internet Explorer <= 9? I have this issue in IE9 only, and only when using prepend.

@yukw777
Copy link

yukw777 commented Jan 21, 2016

I see this problem on the latest version of Chrome also.

@eas604
Copy link

eas604 commented Jan 21, 2016

@yukw777, how does it look in this plunkr for you?

@yukw777
Copy link

yukw777 commented Jan 21, 2016

https://plnkr.co/edit/jMB2YLfPLzttTU6vJLNU?p=preview

This reproduces the bug I'm seeing. When you submit the form after entering a number, it will look all screwy.

@eas604
Copy link

eas604 commented Jan 21, 2016

It's the use of ng-submit in conjunction with this directive that's giving you trouble. I'm not sure what the root of the bug is, but if you change the form to use a button with an ng-click, you get the expected behavior. Similarly, if you remove fcsa-number from the <input>, then ng-submit works as intended.

This sounds like it's also causing @AlmogBaku 's error.

@edgarsantiag0
Copy link

It's happening when you use {prepend: '$'}, remove it and that will fix it. But it is a bug.

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

4 participants