I am facing an issue with the # sign in Angular routing. I have navigation links that should not have a leading slash, like this:
<li class="active"><a href="/"><i class="fa fa-home" aria-hidden="true"></i></a></li>
<li><a href="#services"> УСЛУГИ</a></li>
Scrollspy does not work if I use <a href="#/services">
.
However, there is now an issue with Angular routing set up as follows:
config(["$routeProvider", function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: '/templates/home.html',
controller: 'smu72Controller'
})
.when('/objects', {
templateUrl: '/templates/objects.html',
controller: 'smu72Controller'
})
.when('/object/:Id', {
templateUrl: '/templates/object.html',
controller: 'smu72Controller'
})
.otherwise({
redirectTo: "/"
});
What changes should I make to the routing (or scrollspy) configuration to be able to use these navigation links for both scrollspy and angular routing purposes?