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

New Example: replace spaces with underscores as user types #63

Open
jaymorgan opened this issue Aug 5, 2015 · 3 comments
Open

New Example: replace spaces with underscores as user types #63

jaymorgan opened this issue Aug 5, 2015 · 3 comments

Comments

@jaymorgan
Copy link

I can't seem to wrap my head around this. I want to be able to replace spaces with underscores in a field as someone types. Seems like it should be easy to do but I'm not able to out it together. Is this already addressed somewhere?

@kentcdodds
Copy link
Member

You could probably use ng-mask for this: http://angular-formly.com/#/example/very-advanced/ng-mask

@jaymorgan
Copy link
Author

I want it to actually change the value in the model though. This would only alter how the value is displayed, right?

@kentcdodds
Copy link
Member

Ah, yes, that's true. You'll want to look into the new parsers property that utilizes the $parsers api from angular. It's not very well documented and there's no example yet, but here's the issue that describes how it works: formly-js/angular-formly#368

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