javascript - Textarea: Allow to begin with linebreak -


i'm developing ionic/cordova app. there textarea visible user can input data, transferred server.

here, user should able input line breaks. problem i'm facing right it's possible after input first character; , it's not possible begin line break. ng-model cuts off beginning line breaks. how can achieve goal?

the textarea looks this:

<textarea ng-model="card.text" id="text-message" rows="20"></textarea> 

thank you.

according https://github.com/angular/angular.js/issues/2010 can apply ng-trim="false" element stop behaviour so:

<textarea ng-model="card.text" ng-trim="false" id="text-message" rows="20"></textarea> 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -