0
下面是我的角碼查看未呈現,
MDIApp.controller("loginCtrl", function ($scope, $http,$location,$sce) {
$scope.toTrustedHTML = function (html) {
return $sce.trustAsHtml(html);
}
$scope.getLogin = function (proCode) {
alert("Code " + proCode);
$http({
method: 'GET',
url: '/Home/getProviderLogin?id=' + proCode,
}).
success(function (data) {
debugger;
$scope.ProviderLogin = data;
$scope.ProviderLoginPop = true;
//$location.path = '~/WelcomePage.cshtml';
$http.post("/Home/WelcomePage", { postId: id });
});
}
});
和下面是我的控制器代碼
public ActionResult getProviderLogin(string id)
{
var providercode = objHomeRepo.getLogin(id);
//return View("WelcomePage");
return RedirectToAction("WelcomePage", "Home");
}
我想打電話給welcomepage看法,但它不是渲染....
'$ http'是異步請求,所以你覺得'RedirectToAction '會工作嗎? – Satpal
我是新角度請建議 –
我試圖使用返回視圖(「WelcomePage」);同樣的問題 –