Angular 2 application deployed on Amazon s3 gives 404 error

I have successfully applied my Angular2 application on Amazon S3. It is working fine. All routing works fine when I navigate using routeLinks / code.

But when I refresh the page or go to a specific route, I get 404 error as follows: enter image description here

The fact is that we know that we have dynamic routes in Angular2. There is no physical directory with this path / route name in the final code base deployed / saved in the S3 bucket. But, I think, S3 considers it to be a physical object stored in an S3 bucket, which he cannot extract.

How to solve this problem?

+4
source share
1

. "" > " -".

Error document index.html, .

+2

Source: https://habr.com/ru/post/1668703/


All Articles