Sprucing up homepage, real e-mail
This commit is contained in:
@@ -3,18 +3,19 @@ lunchControllers = angular.module 'lunchControllers'
|
||||
lunchControllers.controller 'CreateRunCtrl', ['$scope', '$http', '$location', 'socket',
|
||||
CreateRunController = ($scope, $http, $location, socket) ->
|
||||
$scope.run =
|
||||
name: 'run name',
|
||||
creatorName: 'ben ramey'
|
||||
creatorEmail: 'ben.ramey@gmail.com'
|
||||
invitees: [{name: 'bob', email: 'bob@bob.com'}]
|
||||
restaurant: 'subway'
|
||||
invitees: []
|
||||
|
||||
$scope.addInvitee = () ->
|
||||
$scope.run.invitees.push {}
|
||||
|
||||
$scope.removeInvitee = (index) ->
|
||||
$scope.run.invitees.splice index, 1
|
||||
|
||||
$scope.create = (run) ->
|
||||
data = angular.copy run
|
||||
socket.post '/run', data, (response) ->
|
||||
$location.path '/run/' + response.id
|
||||
$scope.$apply()
|
||||
|
||||
$scope.addInvitee()
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user