javascript - Angular binding not working in Chrome/Opera -
hi jsfiddle works in internet explorer , firefox no other browxsers work. idea of code currency converter date using yahoo currency api. doesn't update $scope on other browsers way supposed on chrome. http://jsfiddle.net/xhmlt/13/ choose post ({{visible.post}} visible)
<select> <option ng-repeat="shot in shots" ng-click="visible.post = shot.name" value="{{shot.name}}">{{shot.name}}</option> </select> <div ng-repeat="shot in shots" ng-if="visible.post == shot.name">{{shot.rate | currency:'':''}} </div> <div ng-repeat="shot in shots" ng-if="visible.post == shot.name">{{shot.rate *5 | currency:'':''}} </div>
i updated fiddle , working you'd intended...
your select populated via ng-options , model visible.post (as object). result anywhere showing visible.post, showing visible.post.name (field on object)
<select ng-options="s.name s in shots" ng-model="visible.post"></select> the initialization of selected value done in success promise handler:
$scope.visible.post = $scope.shots[0];
Comments
Post a Comment