Angular deployment - 404 on page Refresh

后端 未结 4 1181
小蘑菇
小蘑菇 2021-01-07 11:50

i would like to deploy my app in Angular to production server but I have problems. App works corectly when I use only angular routing (change component, not redirecting) but

4条回答
  •  迷失自我
    2021-01-07 12:19

    My initial workaround was to just redirect on 404 back to root, and so far, I don't see a down-side to this. To my surprise, both the request path and parameters persist when refreshing. This is in an IIS 10 environment with Angular 9, and a Chrome-only (internal app) so there may be other factors at play that I'm unaware of that are only making this seem sustainable. Will try to remember to come back to my answer should we discover something.

    
    
        
            
                
                
            
        
    
    

提交回复
热议问题