I was searching, but did not manage finding any answer, maybe here someone smart knows what to do. I have Angular SPA, with ASP.NET Core back-end. In Angular I dont want to use Hash Bang Routes
. But I have no idea how to configure routing, to be able to refresh or enter a SPA component page with a parameter. For example: somewebsite.com/a5eccbd9 //where a5eccbd9 is a parameter
.
Examples closest to my problem, but routing just to index.html
of the SPA.
https://stackoverflow.com/a/61275033
But after being routed to the file, what next to do with parameter and being redirected to the correct component? My Angular routing:
const routes: Routes = [
...
{
path: '',
component: FormComponent,
},
{
path: ':id',
component: FormComponent,
},
...
];
And in index.html
I have: <base href="/" />
And in my dead end I have no idea how to make back-end redirecting me properly.