0
我在我的角度應用程序中使用stateProvider時遇到了一些問題。我想消除#的URL地址,我用這個$ locationProvider與html5Mode。但在此之後,當我想要轉到其他url狀態(例如mysite.com/state)時,應用程序返回'無法獲取'(delete##一切正常)。有沒有可能解決這個問題?從我的角度應用程序中的URL中消除##
$stateProvider
.state('home', {
url: '/',
templateUrl: 'components/home.html'
})
.state('state', {
url: '/state',
templateUrl: 'components/state.html',
});
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
尋找答案:http://stackoverflow.com/questions/16677528/html5和hashbang-mode-link-rewriting之間的位置切換 – Gaurav
[$ location/html5和hashbang模式之間的切換/鏈接重寫]的可能重複(http://stackoverflow.com/questions/16677528/location-switching-between-html5-and-hashbang-mode-link-rewriting) –
我嘗試用這個鏈接解決我的問題,但它不能解決我的問題lem –