You need the data from a textarea as it is on saving without the automatic trimming.
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>