-1
http成功応答データをC#コントローラに送信し、そのコントローラをビュー(別のページ) 。In AngularJS C#コントローラとコントローラにViewへのhttp成功応答(レスポンスの完全なデータ)を送信する方法
これは私のangularJsのhttpコードです:$ scope.mainServicesに私はresponeを取っていると私はC#のコントローラに$ scope.mainServicesで提供されている全データを送信するために必要と
var req = {
method: 'POST',
url: 'GuestSearch',
dataType: 'json',
data: { 'Address': address, 'City': city, 'state': state, 'ZipCode':zipcode }
}
$http(req)
.success(function (response) {
$scope.mainServices = response;
if($scope.mainServices == "")
{
$("#lbl_msg").html('No Services available for this Location.Please select different Location').fadeOut(9000);
}
})
.error(function (data, status, headers, config) {
console.error('Error while retrieving profile information ' + data);
});
そのコントローラがあります
public ActionResult AllServices()
{
return View();
}
と私はこのコードとC#のコントローラが属するAngularJS場合
角度のないJSコードは1ページにあり、私はその応答を別のページに送信する必要があります –