1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-16 11:15:12 +00:00

add agreement

This commit is contained in:
Rokt33r
2015-07-03 16:41:42 +09:00
parent 1a832c1fc4
commit 2284fd41b9
13 changed files with 479 additions and 12 deletions

View File

@@ -1,20 +1,23 @@
/* global angular */
angular.module('codexen')
.controller('AuthRegisterController', function ($auth, $log, $state, $rootScope) {
.controller('AuthRegisterController', function ($auth, $log, $state, $rootScope, Modal) {
var vm = this
vm.isEmpty = function (obj) {
for (var i in obj) if (obj.hasOwnProperty(i)) return false
return true
}
vm.signup = function () {
$auth.signup({
email: vm.email,
password: vm.password,
name: vm.name,
profileName: vm.profileName
}).then(function (data) {
$rootScope.$broadcast('userSignIn')
$state.go('home')
})
Modal.showAgreement()
.then(function () {
$auth.signup({
email: vm.email,
password: vm.password,
name: vm.name,
profileName: vm.profileName
}).then(function (data) {
$rootScope.$broadcast('userSignIn')
$state.go('home')
})
})
}
})