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 '/run/:id/order/:inviteeName',
                templateUrl: 'templates/run/create-order.html',
                controller: 'CreateOrderCtrl'
            .otherwise
                redirectTo: '/home'
]

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