Last active
September 18, 2016 10:36
-
-
Save n8finch/fbd483555445a9f35c08558b01ae9265 to your computer and use it in GitHub Desktop.
routes-for-genesis-angular-gulp-app
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
//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