Greetings! I am currently experimenting with an example that involves displaying values in a text area. You can find the code on Plunker by following this link: Plunker Link
<!DOCTYPE html>
<html>
<head>
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"
type="text/javascript"></script>
<script src="script.js"></script>
</head>
<body ng-app="testApp" ng-controller="testController">
<textarea ng-model="stringArray" ng-list=" " ng-trim="false"
rows="10">
</textarea>
<div>
{{stringArray}}
</div>
</body>
</html>
// Code snippet above
var testApp = angular.module('testApp', []);
testApp.controller('testController', function ($scope)
{
$scope.stringArray =
[
"First String",
"Second String",
"Third String"
];
});
I am curious to learn how to retrieve the selected value from the text area. For instance, if 'First String' is selected, I want only that value to appear in the output.