我正在尝试将遗留的asp.net mvc4应用程序简化。在角形js控制器内执行web http.put之后,我希望页面被定向到另一个asp.net mvc4动作/控制器。这怎么可能呢?
$scope.saveEditProfile = function () {
$http.put("/api/ProfileWeb", $scope.profile)
.then(function(response) {
$scope.profile = response.data;
});//需要一些重路由指令来路由到asp.net,mvc操作= Inedex和Controller =Profile.
};发布于 2014-10-24 14:57:41
您可以使用
window.location ="/Profile/Index";ie:
$scope.saveEditProfile = function () {
$http.put("/api/ProfileWeb", $scope.profile)
.then(function(response) {
$scope.profile = response.data;
window.location ="/Profile/Index";
});
};https://stackoverflow.com/questions/26550093
复制相似问题