1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-11-15 01:06:32 -05:00
shimapan/app/public/shimapan/components/RegisterComp.js

15 lines
581 B
JavaScript

var angular = require('angular');
angular.module('RegisterComp', ['AuthSvc']).component('registerComponent', {
templateUrl: '/views/shimapan/register-form.html',
controller: ['$scope', '$timeout', 'AuthService', function($scope, $timeout, AuthService) {
$scope.register = function() {
AuthService.register($scope.username, $scope.password, $scope.invite).catch(function() {
$scope.error = true;
$timeout(function() {
$scope.error = false
}, 820);
});
};
}]
});