Working signup :)

This commit is contained in:
Will Marshall
2014-03-21 13:53:35 +11:00
parent 40d1563cd9
commit b623a64fb4
2 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
window.SignupSidebarCtrl = Darkswarm.controller "SignupSidebarCtrl", ($scope) ->
window.SignupSidebarCtrl = Darkswarm.controller "SignupSidebarCtrl", ($scope, $http) ->
$scope.spree_user = {}
$scope.errors =
email: null
password: null
$scope.active = ->
$scope.active_sidebar == '/signup'
@@ -8,4 +11,4 @@ window.SignupSidebarCtrl = Darkswarm.controller "SignupSidebarCtrl", ($scope) ->
$http.post("/user/spree_user", {spree_user: $scope.spree_user}).success (data)->
location.href = location.origin + location.pathname # Strips out hash fragments
.error (data) ->
$scope.errors = data.message
$scope.errors = data