Created
October 3, 2016 05:04
-
-
Save zymtx5g79k/616f6e0380a29401743368b4f6052196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
app = angular.module('app', [ | |
'ngRoute', | |
'ngResource', | |
'templates', | |
'angularFileUpload' | |
]) | |
app.config([ '$routeProvider', '$locationProvider', '$httpProvider', | |
($routeProvider, $locationProvider, $httpProvider) -> | |
$httpProvider.defaults.headers.common['X-CSRF-TOKEN'] = $('meta[name=csrf-token]').attr('content') | |
$routeProvider | |
.when("/" | |
templateUrl: "angular/templates/books/index.html" | |
controller: "BooksController" | |
mainPage: true | |
) | |
.when("/books" | |
templateUrl: "angular/templates/books/index.html" | |
controller: "BooksController" | |
mainPage: true | |
) | |
.when("/books/:bookId/edit" | |
templateUrl: "angular/templates/books/edit.html" | |
controller: "BooksController" | |
) | |
.when("/books/new" | |
templateUrl: "angular/templates/books/new.html" | |
controller: "BooksController" | |
) | |
$locationProvider.html5Mode(true) | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment