diff --git a/members/static/js/application_controllers.js b/members/static/js/application_controllers.js index 387e1b3..ed0f7f2 100644 --- a/members/static/js/application_controllers.js +++ b/members/static/js/application_controllers.js @@ -26,7 +26,7 @@ var notySuccess = notyfication('success',2500); //controllers -app.controller("applicationController", function($scope, $http, $location) { +app.controller("applicationController", function($scope, $http, $location, $window) { $scope.firstName = ""; $scope.lastName = ""; $scope.email = ""; @@ -37,7 +37,8 @@ app.controller("applicationController", function($scope, $http, $location) { $scope.send = function() { $http.post("/members/api/request", {"first_name":$scope.firstName, "last_name":$scope.lastName, "email":$scope.email, /*"year":$scope.year,*/ "AYY":$scope.AYY, "jas":$scope.JAS, "POR":$scope.POR}).then(function(data){ notySuccess("Hakemus lähetetty!"); - $location.path("application/"); + $window.location.href = "/application/"; + //$route.reload(); }); } }); \ No newline at end of file