I am implementing a character countdown (similar to Twitter's) and am finding that the character count isn't counting spaces. How do I modify the following to include spaces as well as characters?
<span class="characterLimit" ng:bind="140 - result.shortName.length"></span>
By default angular trims anything bound using ng-model
in later versions (1.1.x as far as I know) you can turn off this behaviour using ng-trim="false"
:
<input type="text" ng-model="tweet" ng-trim="false">
I made a demo of this here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With