Disable trimming in input fields
Disable trimming in input fields

Problem

You need the data from a textarea as it is on saving without the automatic trimming.

Solution

AngularJS makes good assumptions by default. One example is automatic trimming. If you don’t want it, you can disable it as follows:

<textarea ng-model="bio" ng-trim="false"></textarea>