Now, my website's url looks like this because I'm using the approach described here
http://localhost:4200/#/cadastro
Is it possible to remove the hash in the url and not get the 404 error?
EDIT: Router Module added
const appRoutes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'cadastro', component: CadastroNoivosComponent },
{ path: '**', component: HomeComponent }
];
export const routing = RouterModule.forRoot(appRoutes);
See Question&Answers more detail:os