Files
openfoodnetwork/app/assets/javascripts/darkswarm/controllers/authentication/signup_controller.js.coffee
2014-05-06 18:28:20 +10:00

12 lines
409 B
CoffeeScript

Darkswarm.controller "SignupCtrl", ($scope, $http, $location, AuthenticationService) ->
$scope.path = "/signup"
$scope.errors =
email: null
password: null
$scope.submit = ->
$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