Reputation:
i have an html input data list where i need to pass the selected value into javascript / angular. It needs to be passed as the datalist is going into a html table so there will be many of them. All the examples i have seen grab it in the javascript instead of passing it into a method.
I tried on-select but it did nothing. I am also using angular 1
<datalist id="dataList">
<option ng-repeat="note in linknotes" value="{{note}}">{{note}}</option>
</datalist>
<input maxlength="50" type="text" list="dataList">
$scope.linknotes = [
'Note 1',
'Note 2',
'Note 3',
'Note 4',
'Note 5',
'Note 6'
].sort();
Upvotes: 0
Views: 373