By default pathToMatch property is prefix. I have configured a url with
{path: 'courses', component: CoursesComponent},
{path: '**', redirectTo: 'courses'}
I opened the browser and redirected my page to say https://localhost:4200/#/courses/12/someInfo
The url can be /courses/../../../.. till any level of depth.
Angular router internally redirects to https://localhost:4200/#/courses url.
I want to persist the other info also in above scenario which is .../12/someInfo
I need that info because inside my CoursesComponent i am loading a non angular microservice which needs that url info. That microservice internally manages to initialize different courses urls based on hashable url.
How can an maintain the url on pageload without allowing angular to trim url to defined routes?
/courses
a valid url, or is it always followed by/{number}/{someInfo}
? I'm assuming both{number}
and{someInfo}
are changeable parameters here? – Kurt Hamilton