此錯誤開始顯示自己我加$locationProvider.html5Mode(true)
我的狀態配置上AngularJS後:與html5mode
'Cannot GET error' after refreshing page with html5mode
I`ve搜索了一下,發現此修復程序到服務器端,但它不會是因爲某些JSON錯誤的工作:(也許有人知道如何正確地解決它不用其他製造新的錯誤)
app.get('*', function(req, res) {
res.sendFile(__dirname + '/public/index.html');
});
您可以顯示至少使用一個錯誤嗎? – 31piy
'位置0的JSON中出現意外的標記'此錯誤顯示出來,當我將res.sendFIle添加到後端站點時 – rebilliony
另外,當我刪除html5Mode和res.sendFile時,所有工作都正確,除了#!在URL .. – rebilliony