Syntax Error in Angular App: Unexpected token <

后端 未结 30 2197
独厮守ぢ
独厮守ぢ 2020-12-02 20:16

I have an Angular app which runs perfectly in my local and production environment.. After a tiny change I made, I ran the app locally and it works fine.. Then I built the pr

30条回答
  •  广开言路
    2020-12-02 20:45

    With a little change in the .htaccess file i managed to fixed this problem.

    I changed some lines from https://angular.io/guide/deployment#fallback to the following:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.html
    

提交回复
热议问题