Created
November 9, 2016 09:31
-
-
Save akleemans/bc6fd06207ef0149c852694b7df632ca to your computer and use it in GitHub Desktop.
Routing configuration for vocabulario 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
angular.module('VociTrainer', ['ngRoute']) | |
.config(['$routeProvider', '$locationProvider', | |
function ($routeProvider, $locationProvider) { | |
$routeProvider | |
.when('/home', { | |
templateUrl: 'views/home/home.html', | |
controller: 'HomeCtrl', | |
controllerAs: 'home' | |
}) | |
.when('/impressum', { | |
templateUrl: 'views/impressum/impressum.html', | |
controller: 'ImpressumCtrl', | |
controllerAs: 'impressum' | |
}) | |
.when('/practice', { | |
templateUrl: 'views/practice/practice.html', | |
controller: 'PracticeCtrl', | |
ontrollerAs: 'practice' | |
}) | |
.when('/profile', { | |
templateUrl: 'views/profile/profile.html', | |
controller: 'ProfileCtrl', | |
controllerAs: 'profile' | |
}) | |
// ... | |
.otherwise({redirectTo: '/home'}); | |
// setting html5 mode | |
$locationProvider.html5Mode(true); | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment