1
0
mirror of https://github.com/Foltik/Shimapan synced 2024-09-21 11:11:22 -04:00
shimapan/public/js/components/RegisterComp.js
2017-10-11 10:15:19 -04:00

16 lines
463 B
JavaScript

function RegisterController($scope, AuthService) {
$scope.register = function() {
AuthService.register({
username: $scope.username,
password: $scope.password
}).then(function() {
alert('Registered');
});
};
}
angular.module('RegisterComp', ['AuthSvc']).component('registerComponent', {
templateUrl: '/views/register-form.html',
controller: RegisterController,
controllerAs: 'vm'
});