我有以下选择(在jade中):
select(ng-model="note.shop1", ng-change="selectShop()", ng-disabled="allShops" ng-show="positionAvailable")
option(ng-repeat="shop in nearbyShops" value="{{shop._id}}")
{{shop.name}} ({{shop.contact_address}} {{shop.contact_housenr}}, {{shop.contact_city}})
option(value="otherShop") My store isn't listed.
控制器中的Selectshop():
$scope.selectShop = function(){
if($scope.note.shop1 == "otherShop"){
$scope.allShops = true;
}
}
我想存储选定的ID,这样就可以保存它,但我想在用户选择商店时向用户显示{{shop.name}}
。我该怎么做呢?
因此,我希望选择{{shop._id}}
,并选择{{shop.name}}
{{shop._id}}
。
转载请注明出处:http://www.cpss-cn.com/article/20230526/2267886.html