"ng build"명령 줄을 사용하여 angular2 응용 프로그램을 빌드 한 후 "dist"파일의 내용을 서버에 추가했습니다 (FTP 클라이언트를 실행 함). "CMS". Angular2 - 배포 모드에서 라우팅이 중지되었습니다.
The server have website files.
I need to access my angular2 application when i calling the URL like this:
http://thewebsiteurlintheserver.com/CMS
내가 마지막 (http://thewebsiteurlintheserver.com/CMS를) 할
난이 오류가있어 :ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'CMS' Error: Cannot match any routes. URL Segment: 'CMS'
당신이 각 CLI 또는 index.html을에서 응용 프로그램의 basepath을 설정 않았다
index.html
에 기본 HREF을 변경할 수 있습니다 –예 기본 "<기본 href ="/ ">" @ index.html에있는 @AniruddhaDas –
기본 경로'/'에 있지 않은 디렉토리에 코드를 넣는 것처럼 기본 경로를' '로 시도하십시오 –