I am working with Angular 9 and when I uploaded the project, I encountered a 404 error refreshing the page, I used the following method to fix this and this problem was fixe