I have an HTML file using a <textarea> whose input I want to acquire using an Angular controller. Relevant HTML code is as follows:
<div class="list">
<textarea
placeholder="Comments"
id="feedback"
ng-model="feedbackInput">
</textarea>
</div>
Here is the relevant code for my Javascript controller, which I feel like is on the right track, but produces the output:
$scope.finishSummary = function(){
$scope.feedbackInput = "";
console.log( "Feedback text = " + JSON.stringify($scope.feedbackInput) );
}
which produces the output:
Feedback text= ""
I use a "console.log()" simply for debugging purposes, but I want to be able to see the actual input value from the <textarea>. I'm relatively new to coding in HTML and especially with using Angular, so excuse my inexperience with the matter. In the end I just want to check to see if there is no text in the <textarea>. Any suggestions with how to do this so I can inject the data input from <textarea> into Angular? Thanks!