If you use the Angular finale, the reasons for the hash may be:
RouterModule.forRoot(yourRoutesHere, { useHash: true })
Thus, removal can help.
RouterModule.forRoot(yourRoutesHere)
Alternatively, if you used in your providers (in NgModule):
{provide: LocationStrategy, useClass: HashLocationStrategy}
just delete it.
EDIT, if you need a LocationStrategy, try changing HashLocationStrategy
to PathLocationStrategy
:
{provide: LocationStrategy, useClass: PathLocationStrategy}
Learn more about LocationStrategy here.
Now that I have seen your routes and regarding your 404 problem, you can try changing the following
{ path: '**', component: HomeComponent }
in
{ path: '**', redirectTo: '', pathMatch: 'full' }
More about routing here.
Also check that in index.html
you set basehref as follows:
<base href="/">
source share