I'm facing an issue with Angular UI router in my application. Instead of getting the expected localhost:8000/#/
, I am receiving localhost:8000/#!#%2F
.
This is how my app.js looks like:
angular
.module('quiz',['ngMaterial',
'ngMessages',
'ngCookies',
'ngResource',
'quiz.routes'
]).config(function($resourceProvider) {
$resourceProvider.defaults.stripTrailingSlashes = false;
});
angular
.module('quiz.routes',['ui.router']);
In my quiz.routes.js file, I have the following configuration:
(function () {
angular
.module('quiz.routes')
.config(config);
function config($urlRouterProvider,$stateProvider){
$stateProvider
.state('register',{
url: '',
templateUrl: '/static/templates/register.html'
});
}
})();
The URL generated has !#%2F instead of a trailing slash. Any idea why this might be happening?