Fixed reloading after post
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user