Fixed reloading after post

This commit is contained in:
HooVee
2016-09-15 18:26:16 +03:00
parent f41428c048
commit b17e0bfff8
+3 -2
View File
@@ -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();
});
}
});