Call a page via ajax Angularjs

0

My ajax code:

$scope.CarregaMenuPrincipal = function (data) 
{
    var req = $http({ method: 'POST', url: '/Home/Index',data:{usuario: data.usuario },})
       .then(function (response) {
           response;
       }, function (response) {
          response;
       });
}

My code on the Controller

public ActionResult Index(UsuarioModel usuario)
{
    if (usuario != null && usuario.ListaRegras != null)
    {
        return View(usuario);
    }
    else
       return RedirectToAction("Login", "Home", usuario);
}

When you run the return view (user) line, it goes through the view creating the entire html screen but remains on the login.cshtml screen and does not call the index.cshtml screen. Does anyone know how I can redirect?

    
asked by anonymous 15.01.2018 / 13:51

0 answers