Skip to content

Instantly share code, notes, and snippets.

@shinecita
Created December 13, 2012 20:14
Show Gist options
  • Save shinecita/4279416 to your computer and use it in GitHub Desktop.
Save shinecita/4279416 to your computer and use it in GitHub Desktop.
angular
.module('myApp', ['myApp.controllers'])
.controller('PostController',require('./controllers/posts'))
.config(function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider
.when('/', {templateUrl: 'index', controller: PostController})
.when('/posts/:postId', {templateUrl: 'posts/show', controller: require('./controllers/posts')})
.otherwise({redirectTo:'/'});
})
.run(function($rootScope) {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment