Files
lunchrun.me/assets/linker/js/controllers.coffee
2014-03-12 21:49:16 -05:00

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!'
]