var app = angular.module('mainCtrl', ['ngRoute'])
.config(config)
.run(run);
config.$inject = ['$routeProvider', '$locationProvider'];
function config($routeProvider, $locationProvider) {
$routeProvider
.when( '/', {
templateUrl: 'views/login.view.html'
})
.when( '/home', {
templateUrl: 'views/home.html',
controller: 'HomeCtrl'
})
.otherwise({
redirectTo: '/'
});
$locationProvider.html5Mode(true);
};
For this to work, you will have to set the base url. This can be done by putting the
That will remove the hash from the urls.
No comments:
Post a Comment