javascript - Select box placeholder in HTML Template -
code in controller:
$scope.infooptions = [ { name: 'select option', value: '0' }, { name: 'some option', value: '1' } ];
html:
<select data-ng-model="nothing" data-ng-options="info.name info in infooptions "> </select>
angular puts damn empty alternative @ top/selected default. i've seen answers question suggest selecting default alternative in $scope form, select box in template in dynamic form (ie. can number of select boxes). demonstration purposes - there anyway can rid of empty alternative in template?
javascript angularjs
No comments:
Post a Comment