0

I have an angular 7 application. My application working my local without any problem. But when I published, I get 404 error. I'm using PathLocationService. Providers part of app.module.ts is like below. I tried also publishing by ng build --prod --aot --source-map=false --base-href. But, also not worked. What can be the reason of this? (When I go www.mywebsite.com/index.html I can see my loading bar. But www.mywebsite.com/MyPage then I get 404 error.)

  providers: [
    { provide: HTTP_INTERCEPTORS, useClass: LoaderInterceptor, multi: true },
    UserService, DatePipe, AuthGuard, RoleGuard, FormBuilder
  ],
realist
  • 2,155
  • 12
  • 38
  • 77

0 Answers0