diff --git a/app/public/shimapan/components/LoginComp.js b/app/public/shimapan/components/LoginComp.js index 756cef9..68baa47 100755 --- a/app/public/shimapan/components/LoginComp.js +++ b/app/public/shimapan/components/LoginComp.js @@ -11,7 +11,7 @@ angular.module('LoginComp', ['AuthSvc']).component('loginComponent', { $scope.error = true; $timeout(function() { $scope.error = false; - },820); + }, 820); }); }; }] diff --git a/app/public/shimapan/components/RegisterComp.js b/app/public/shimapan/components/RegisterComp.js index 8bb5c94..fb1c321 100755 --- a/app/public/shimapan/components/RegisterComp.js +++ b/app/public/shimapan/components/RegisterComp.js @@ -2,12 +2,17 @@ var angular = require('angular'); angular.module('RegisterComp', ['AuthSvc']).component('registerComponent', { templateUrl: '/views/shimapan/register-form.html', - controller: ['$scope', 'AuthService', function ($scope, AuthService) { + controller: ['$scope', '$timeout', 'AuthService', function ($scope, $timeout, AuthService) { $scope.register = function () { AuthService.register({ username: $scope.username, password: $scope.password, invite: $scope.invite + }).catch(function() { + $scope.error = true; + $timeout(function() { + $scope.error = false + }, 820); }); }; }] diff --git a/public/views/shimapan/login-form.html b/public/views/shimapan/login-form.html index f220de2..88b65dc 100755 --- a/public/views/shimapan/login-form.html +++ b/public/views/shimapan/login-form.html @@ -4,7 +4,7 @@
\ No newline at end of file diff --git a/public/views/shimapan/register-form.html b/public/views/shimapan/register-form.html index 0909df3..2ec70f4 100755 --- a/public/views/shimapan/register-form.html +++ b/public/views/shimapan/register-form.html @@ -5,7 +5,7 @@ - + \ No newline at end of file