I'm trying remove from my url #, but when I add $locationProvider.html5Mode(true); and my app.js and <base href='/'> on my HTML, I get an error from AngularJS:
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.0/$injector/modulerr?p0=AppDj&p1=TypeError%…oogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.5.0%2Fangular.min.js%3A20%3A69)
var AppDj = angular.module('AppDj', ['ngRoute']);
AppDj.config(['$routeProvider', function($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/home.html',
controller: 'mainCrtl'
})
.when('/login', {
templateUrl: 'views/login.html'
})
.when('/register', {
templateUrl: 'views/register.html'
})
.otherwise({
redirectTo: '/'
})
$locationProvider.html5Mode(true);
}]);
AppDj.controller('mainCrtl', function ($scope){
});
<script src="angular-route.js">??