Working run save

This commit is contained in:
Ben Ramey
2014-03-12 21:49:16 -05:00
parent e18e186be0
commit 0fbee6ecc9
6 changed files with 45 additions and 33 deletions

View File

@@ -4,10 +4,16 @@ lunchControllers.controller 'HomeCtrl', ['$scope', ($scope) ->
]
lunchControllers.controller 'CreateRunCtrl', ['$scope', '$http', 'socket', ($scope, $http, socket) ->
$scope.stuffs = [{name: 'my name'}]
$scope.run =
invitees: [{email: ''}]
$scope.addInvitee = () ->
$scope.run.invitees.push { email: '' }
$scope.create = (run) ->
socket.post '/run', run, (response) ->
data = angular.copy run
socket.post '/run', data, (response) ->
return
]
lunchControllers.controller 'RunsCtrl', ['$scope', '$http', ($scope, $http) ->