myApp.controller('searchRunsCtrl', function($scope, $http) {
$http.get("/users/searchProvince")
.success(function(response) {
$scope.provinceArr = response;
});
$scope.$watch('desPrivince',function(newV, oldV){
if(newV !== oldV){
$scope.desCity = $scope.desArea = null;
$scope.cityArr = $scope.areaArr = [];
var pro = {
pro_id: newV
};
$http({
method: 'POST',
url: '/users/searchCity',
data: $.param(pro),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
.success(function(response) {
$scope.cityArr = response;
});
}
});
$scope.$watch('desCity',function(newV, oldV){