angularjs - Moving from bs-options in angularstrap to select in vanilla -
this part of page
<div ng-controller="dtbctrl" class="container"> <div class="thumbnail"><img ng-src="{{pic + selectedpitch + selectedwood}}" class="img-responsive"> <div class="caption"> <div class="col-xs-6 text-right"> <label class="hidden-xs">registro: </label> <button type="button" ng-model="selectedpitch" bs-options="pitch.value pitch.label pitch in pitches" bs-select="" animation="am-flip-x" data-placement="right-top" class="btn btn-default navbar-btn">seleziona <span class="caret"></span></button> </div> <div class="col-xs-6 text-left"> <label class="hidden-xs">legno: </label> <button type="button" ng-model="selectedwood" bs-options="wood.value wood.label wood in woods" bs-select="" animation="am-flip-x" data-placement="left-top" class="btn btn-default navbar-btn">seleziona <span class="caret"></span></button> </div> </div> </div> </div>
and app.js
app.controller('dtbctrl', function($scope, $http) { $scope.selectedpitch = 'compara'; $scope.selectedwood = 'compara'; $scope.pitches = [ { value: 'compara', label: 'compara' }, { value: 'grave', label: 'grave' }, { value: 'medio', label: 'medio' }, { value: 'acuto', label: 'acuto' } ]; $scope.woods = [ { value: 'compara', label: 'compara' }, { value: 'teak', label: 'teak' }, { value: 'padouk', label: 'padouk' } ]; $scope.pic = 'http://www.placehold.it/1618x1000?text='; });
everything works fine angular-strap, without it, moving vanilla (well, angular), doesn't.
<select ng-options="pitch.label pitch in pitches" ng-model="{{selectedpitch}}"></select>
what doing wrong? why no options in select form?
it should ng-model="selectedpitch"
, not ng-model="{{selectedpitch}}"
.
Comments
Post a Comment