ui-mask
ui-mask copied to clipboard
ui mask filter
It would be great to have ui-mask-like filter. Example:
{{1234567899 | mask: '(999) 999-9999'}} // -> (123) 456-7899
:+1:
Yeah, totally true. This module sucks without it... Seems quite logical...
+1
Just found this: http://stackoverflow.com/questions/20999141/how-do-i-get-masked-date-in-model-from-input-in-angular-using-ui-mask
And it works, so it seems it is included... If only stuff such as notifications existed :-D
Thanks, that helped!
PR are welcomed, feel free to improve the demo page.
+1
This is interesting. The use case is slightly different when you're using it as a filter, right? We wouldn't need to validate, for instance.. And, if we don't need to validate, do we need to define the mask explicitly as containing numbers or letters? For example, what would be the difference in functionality for the following two filters?
AAA-999-***
***-***-***
For a value of 12A-AB2-A2B
... If A or 9 actually affect the output, what would the output look like?
Assuming they don't affect the output, the only applicable maskDefinition is the *. If that's the case, this may be a pretty simple filter to write.
+1
I agree, unfortunately it looks like it would require a huge refactor.
Well it's not perfect but it should get you by https://gist.github.com/hahn-kev/b3e74a07b53c26ddee1b
@hahn-kev Thank you very much for that code. You really saved my time.
Regards
+1 much needed feature