0

consider the following code:

<textarea class="normal_textarea" name="description" rows="4" cols="39" maxlength='79'  ng-model='newTimeline.description'>
</textarea>
"{{newTimeline.description}}"

the binding always trims the content in the textarea. But I need the whole content i.e. with leading and trailing whitespaces. How can I get it?

1 Answer 1

1

You can use ng-trim="false":

<textarea ng-trim="false" ng-model="newTimeline.description"></textarea>

More information at Angularjs Document

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.