22 lines
618 B
CoffeeScript
22 lines
618 B
CoffeeScript
lunchControllers = angular.module 'lunchControllers', []
|
|
|
|
lunchControllers.controller 'HomeCtrl', ['$scope', ($scope) ->
|
|
]
|
|
|
|
lunchControllers.controller 'CreateRunCtrl', ['$scope', '$http', 'socket', ($scope, $http, socket) ->
|
|
$scope.run =
|
|
invitees: [{email: ''}]
|
|
|
|
$scope.addInvitee = () ->
|
|
$scope.run.invitees.push { email: '' }
|
|
|
|
$scope.create = (run) ->
|
|
data = angular.copy run
|
|
socket.post '/run', data, (response) ->
|
|
return
|
|
]
|
|
|
|
lunchControllers.controller 'RunsCtrl', ['$scope', '$http', ($scope, $http) ->
|
|
$scope.helloMsg = 'hello there boys and girls!'
|
|
]
|