1

When Page first time load or refresh then this error will generate in console with current url. This error will generate in development server but not generate in localhost. enter image description here

When I click on abcd:1 atright corner then below sources will open enter image description here

Let me know if any solution for this error

I tried with replace <base href="/"> with <base href="./"> in index.html but still not fix this issue. Also try with remove dynamic path in routing.module file.

1 Answers1

1

You could enable hash routing can help avoid 404 errors when refreshing the page.

RouterModule.forRoot(routes, { useHash: true })

Or if you could check if on that server URL rewrite is enabled: all URLs which is not pointing to index.html, should be redirected to it. This is a common issue for SPA's.

Zsolt Balint
  • 767
  • 1
  • 6