404 when I reload page [closed]

I have 404 when I reload the browser. Reading online I can use the solution of:

 1. providers: [
    {provide : LocationStrategy , useClass: HashLocationStrategy}
  ]
 2. RouterModule.forRoot(routes, { useHash: true })

 3. modify web config on the server

I want avoid the # in the url and I prefer a solution in the client and not in the server. Anyone can help me?