Within my HTML, I have both a select input and a number input.
<select class="span3 align-right-input" ui-select2="{minimumResultsForSearch: -1}" ng-model="info.otherUse" ng-init="info.otherUse=lists.primaryFunctions[0].typeName">
<option ng-repeat="list in lists.primaryFunctions">
{{list.typeName}}
</<option>
</select>
<input type="number" name="otherGfa" ng-model="info.otherGfa" />
In my controller, I am attempting to push this data into an array of objects like so:
$scope.otheruses.push({'use':$scope.info.otherUse,'gfa':$scope.info.otherGfa});
When examining the output of `otheruses` through console log, it appears with unwanted newline characters included:
[…] 0: {…} gfa: 40 use: "\n Ambulatory Surgical Center\n \n\n " proto: Object { … } length: 1 proto: Array []
The presence of these newline characters is causing issues when displayed in my view. Can someone help me understand why they are being appended and how to remove them? Thank you in advance! :-)