时间:2021-07-01 10:21:17 帮助过:2人阅读
$scope.addalerts = []; /* 查询 */ $scope.proID = $stateParams.id; if($scope.proID){ GoodsModelService.goodsInfo({ id:$scope.proID },function(result){ if(result.code == 1000){ $scope.proDetail = result.data.goods_info; //总分类 $scope.goodsType = result.data.goods_type; //得到分类的id,传到总分类,得到当前返回值 $scope.goodsTypes = result.data.goods_info.type; if( result.data.goods_info.goods_module){ $scope.addalerts = result.data.goods_info.goods_module; }else{ $scope.addalerts.push({ module_title:null, module_desc:null, }); } } });
<div class="col-sm-8"> <select class="form-control" ng-model="goodsTypes" ng-options="g.id as g.name for g in goodsType"> <!--<option value="">- 请选择 -</option>--> </select> </div>
以上就是angular select 默认值的实例介绍的详细内容,更多请关注Gxl网其它相关文章!