From 350551183c61aa595ad84e3ca0e983057ec48678 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Fri, 3 Apr 2015 19:11:15 +0200 Subject: [PATCH] Retour à la page précédente quand connecté --- public/js/controllers/ConnectCtrl.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/controllers/ConnectCtrl.js b/public/js/controllers/ConnectCtrl.js index 4973fad..7eadaa7 100644 --- a/public/js/controllers/ConnectCtrl.js +++ b/public/js/controllers/ConnectCtrl.js @@ -7,8 +7,11 @@ angular.module('ConnectCtrl', ['SessionsServ', 'EncryptServ', 'angular-ladda']). $scope.connect = { connect: function () { $scope.connecting = true; - SessionServ.connect($scope.connect.login, $scope.connect.pass, function() { + SessionServ.connect($scope.connect.login, $scope.connect.pass, function(err) { $scope.connecting = false; + if (!err) { + window.history.back(); + } }); } }; -- libgit2 0.21.2