I wanted to have masked fields for my form and i found this:http://digitalbush.com/projects/masked-input-plugin/ (that seems to be the de-facto field masking lib for jquery) i wrote a simple directive to utilize it with angular
and for the most part it works http://jsfiddle.net/agamennon12345/S2nuf/This fiddle has two problems that i could not address1- i could not find a way to make it update the model on every character change, only on blur2- if you update the model (using the button on the fiddle) the field will not appear masked (only after it receives focus)so if you find this useful cool, and if you can help me address this issues even better!
One more thing i found this post https://groups.google.com/forum/?fromgroups#!searchin/angular/mask/angular/txZT_T_sYv4/uMC0rfysnccJif you scroll to the end you will see a post by Marc Chung, he was pretty much trying to do the same thing, but i was not capable of making his code work.--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/wdJlsEzPW4wJ.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
You are probably right. We do need to watch for changes to ui-mask though
...from my mobile.
Brilliant Pete! just one question, why a local scope -> scope:{uiMask: '='} instead of just using the attributes and the original scope as in element.mask(attrs.uiMask) this fiddle shows http://jsfiddle.net/guiboy/tYNhx/Then its not necessary to ng-bind to $parent, so i am confused to why that scope is needed.Cheers!
On Sunday, June 24, 2012 2:38:20 PM UTC-3, Guiboy wrote:I wanted to have masked fields for my form and i found this:http://digitalbush.com/projects/masked-input-plugin/ (that seems to be the de-facto field masking lib for jquery) i wrote a simple directive to utilize it with angular
and for the most part it works http://jsfiddle.net/agamennon12345/S2nuf/This fiddle has two problems that i could not address1- i could not find a way to make it update the model on every character change, only on blur2- if you update the model (using the button on the fiddle) the field will not appear masked (only after it receives focus)so if you find this useful cool, and if you can help me address this issues even better!
One more thing i found this post https://groups.google.com/forum/?fromgroups#!searchin/angular/mask/angular/txZT_T_sYv4/uMC0rfysnccJif you scroll to the end you will see a post by Marc Chung, he was pretty much trying to do the same thing, but i was not capable of making his code work.
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/Brqi1vM3k4QJ.
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.
Hi GuiBoy
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.Visit this group at http://groups.google.com/group/angular?hl=en-US.