работает
scope.url = "http://kladr-api.ru/api.php?"
город
query_string = "callback=JSON_CALLBACK" +
"&key=" + scope.key +
"&token=" + scope.token +
"&limit=" + scope.limit +
"&contentType=city" +
"&query=" + scope.city
$http.jsonp(scope.url + query_string).success(function(data) {
scope.result_city = data.result;
scope.change = true;
});
после улица
scope.cityId = scope.result_city[index].id;
query_string = "callback=JSON_CALLBACK" +
"&key=" + scope.key +
"&token=" + scope.token +
"&limit=" + scope.limit +
"&contentType=street" +
"&cityId=" + scope.cityId +
"&query=" + scope.address
$http.jsonp(scope.url + query_string).success(function(data) {
scope.result_street = data.result;
scope.change = true;
});