I'm learning AngularJS and there's one thing that really annoys me.
I use $routeProvider
to declare routing rules for my application:
$routeProvider.when('/test', {
controller: TestCtrl,
templateUrl: 'views/test.html'
})
.otherwise({ redirectTo: '/test' });
but when I navigate to my app in browser I see app/#/test
instead of app/test
.
So my question is why AngularJS adds this hash #
to urls? Is there any possibility to avoid it?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…