I have config() like this.
function config($httpProvider, $routeProvider) {
$httpProvider.interceptors.push('httpInterceptorService');
$routeProvider
.when('/detail/:id', {
controller: 'CourseDetailController',
controllerAs: 'vm',
templateUrl: 'templates/course-detail.html'
})
.otherwise({
redirectTo: '/'
});
}
View
<a class="course--module course--link" href="/#/detail/{{ course._id }}">
when course is clicked URL
is encoded like below and no routing seems to be happening.
http://localhost:5000/#!/#%2Fdetail%2F57029ed4795118be119cc43d
I tried
Removed
/#
fromhref = "/#/detail/{{ course._id }}"
, but this timeURL
becomeshttp://localhost:5000/detail/57029ed4795118be119cc43d
and not picked up angular router and making a server request instead.Manually visited
URL
in the address barhttp://localhost:5000/#!/detail/F57029ed4795118be119cc43d
without encoded character and this time view is changed correctly.
Any idea?.