Skip to content

Instantly share code, notes, and snippets.

@enijar
Created July 28, 2015 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enijar/d2b199dca09a08c3fee5 to your computer and use it in GitHub Desktop.
Save enijar/d2b199dca09a08c3fee5 to your computer and use it in GitHub Desktop.
Angular Configuration File for Laravel
var app = angular.module('app', ['ngRoute']);
/**
* Define all routes and any global Angular scopes.
*
* Note: I am using the templateUrl property to refer to
* a URI for Laravel to pick up and serve, instead of
* loading a HTML file. This is a cleaner way to use
* templates with Angular and Laravel
*/
app.config(function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: document.baseURI + 'templates/home',
controller: 'HomeController'
});
$locationProvider.html5Mode(true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment