Skip to content

Instantly share code, notes, and snippets.

@n8finch
Last active September 18, 2016 10:36
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 n8finch/fbd483555445a9f35c08558b01ae9265 to your computer and use it in GitHub Desktop.
Save n8finch/fbd483555445a9f35c08558b01ae9265 to your computer and use it in GitHub Desktop.
routes-for-genesis-angular-gulp-app
//ROUTES
.config([ '$stateProvider', '$urlRouterProvider', '$locationProvider', function ($stateProvider, $urlRouterProvider, $locationProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider
.state('posts', {
url: '/',
controller: 'Posts',
templateUrl: ajaxInfo.template_directory + 'assets/templates/app-index.html'
})
.state('single', {
url: '/posts/:slug/',
controller: 'singleView',
templateUrl: ajaxInfo.template_directory + 'assets/templates/single.html'
})
.state('page', {
url: '/pages/:slug/',
controller: 'pageView',
templateUrl: ajaxInfo.template_directory + 'assets/templates/page.html'
});
//Enable pretty permalinks, sans the #
$locationProvider.html5Mode(true);
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment