{
"pname":"河南",
"citys":[{"name":"郑州"},{"name":"焦作"}]
},
{
"pname":"河北",
"citys":[{"name":"石家庄"},{"name":"邯郸"}]
}
];
$scope.pchange=function(){
$scope.se2=$scope.se1.citys[0];
};
$http({
method:"get",
url:"haha.json"
}).then(function success(response){
$scope.getdatas=response.data;
},function error(response){
alert("数据请求失败");
});
产地: <select ng-model="se1"
ng-options=" s.pname for s in ld"
ng-init="se1=ld[1]"
ng-change="pchange()"
>
</select>
<select ng-model="se2"
ng-options="c.name for c in se1.citys"
ng-init="se2=se1.citys[0]"
>