lunchApp = angular.module 'lunchApp', [
    'ngRoute',
    'lunchControllers',
    'lunchServices'
]

lunchApp.config ['$routeProvider',
    ($routeProvider) ->
        $routeProvider
            .when '/home',
                templateUrl: 'templates/home.html',
                controller: 'HomeCtrl'
            .when '/run/create',
                templateUrl: 'templates/run/create.html',
                controller: 'CreateRunCtrl'
            .when '/run/:id',
                templateUrl: 'templates/run/show.html',
                controller: 'RunCtrl'
            .when '/order/:inviteeId',
                templateUrl: 'templates/invitee/update-order.html',
                controller: 'UpdateOrderCtrl'
            .otherwise
                redirectTo: '/home'
]

lunchApp.config ['$locationProvider',
    ($locationProvider) ->
        $locationProvider.html5Mode(false).hashPrefix ''
]
