0

I am using angular 6 with spring boot. i copied 'dist' file to spring boot project. and project running properly. but when i refresh the browser, it said 'white label error'. how i prevent from white label error.

working url enter image description here

error page (when refresh) enter image description here

kumara
  • 877
  • 4
  • 19
  • 43
  • Use the answer in https://stackoverflow.com/questions/44692781/configure-spring-boot-to-redirect-404-to-a-single-page-app – chrisinmtown Aug 14 '19 at 18:30

1 Answers1

7

You should use RouterModule.forRoot(AppRoutes, {useHash: true}), useHash As true

https://angular.io/api/common/HashLocationStrategy should help you understand.

Abhishek Ekaanth
  • 2,511
  • 2
  • 19
  • 40