0
html 공급자로 변경되는 각도 js 상태를 구현하려고했습니다. 하지만 페이지를 새로 고치려고하면 404 오류가 표시됩니다. 무엇이 문제인가. ?각도 js 페이지 새로 고침이 작동하지 않습니다.
내 상태 제공자는 HTML5의 conf는
$stateProvider
.state('home', {
url: '/Edu',
views: {
'[email protected]': {
templateUrl: 'dashboard.html',
controller: 'dashCtrl'
}
},
params: {'registerData' : ''}
})
.state('dash_home', {
url: '/dash_home',
views: {
'[email protected]': {
templateUrl: 'dash_home.html',
controller: 'dashCtrl'
}
},
params: {'registerData' : ''}
})
.state('login', {
url: '/login',
views: {
'[email protected]': {
templateUrl: 'login.html',
controller: 'dashCtrl'
}
},
params: {'registerData' : ''}
});
,
app.config(function($locationProvider) {
$locationProvider.html5Mode(false);
});
이며, 또한 HTML 페이지에
<base href="/">
을 넣어. 그러나 그것은 일을 didnt한다.
편집
server {
listen 80 ;
listen [::]:80 ;
root /var/www/Edu;
location/{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
root /var/www/Edu;
try_files $uri /index.html;
}
}
브라우저에 넣은 URL은 무엇입니까? –
[페이지를 다시로드하면 AngularJS HTML5 모드에서 잘못된 GET 요청이 발생할 수 있습니다.] (http://stackoverflow.com/questions/16569841/reloading-the-page-gives-wrong-get-request-with-angularjs-html5- 모드) – Phil
url : Log In – jicks