I still want to know if there is any easy way to let angular not trim the value, please help~
On Friday, June 8, 2012 10:09:40 PM UTC+8, Freewind wrote:
See the demo: http://jsfiddle.net/Freewind/A8VzX/If I input something which has leading or ending spaces, it will be trimmed when displaying it.
How to let angularjs not do this?
On Friday, June 8, 2012 10:09:40 PM UTC+8, Freewind wrote:
See the demo: http://jsfiddle.net/Freewind/A8VzX/If I input something which has leading or ending spaces, it will be trimmed when displaying it.
How to let angularjs not do this?
On Friday, June 8, 2012 10:09:40 PM UTC+8, Freewind wrote:
See the demo: http://jsfiddle.net/Freewind/A8VzX/If I input something which has leading or ending spaces, it will be trimmed when displaying it.
How to let angularjs not do this?
On Friday, June 8, 2012 10:09:40 PM UTC+8, Freewind wrote:
See the demo: http://jsfiddle.net/Freewind/A8VzX/If I input something which has leading or ending spaces, it will be trimmed when displaying it.
How to let angularjs not do this?
On Friday, June 8, 2012 10:09:40 PM UTC+8, Freewind wrote:
See the demo: http://jsfiddle.net/Freewind/A8VzX/If I input something which has leading or ending spaces, it will be trimmed when displaying it.
How to let angularjs not do this?
--To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/mg8OKPlS8OkJ.
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.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.
I think we can add an option to control it, e.g.<input ng-model="name" trim="false" />Then the value won't be trimmed. If attribute "trim" is not provided, it will trim.PS: we can provide more options to the "trim", e.g. trim="start/end/true/false"
Hi,
ngTrim is just an attribute, not a directive. Input directive check it to decide if the value should be trimmed or not.
Regards,
Witold Szczerba
---
Sent from my mobile phone.
--
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.