Я бы хотел, чтобы в моем приложении был URL-адрес
<a href="https://example.com/rootFolder/child/other?page=1&sort=-name#lightbox/" rel="nofollow noreferrer">https://example.com/rootFolder/child/other?page=1&sort=-name#lightbox/</a>{fileID}**
Я пробовал этот маршрутизатор, но мне кажется, что я не могу сопоставить ни одну из частей хеша.
const routes: Routes = [
{
path: '',
redirectTo: 'root',
pathMatch: 'full',
},
{
path: '#/lightbox/:fileID',
component: LightBoxComponent,
outlet: 'light-box',
},
{
matcher: lightBoxMatcher,
component: LightBoxComponent,
outlet: 'light-box',
},
{
matcher: folderMatcher, // Matches any depth of folders
component: MainComponent,
},
];
@NgModule({
imports: [
RouterModule.forRoot(routes, {
onSameUrlNavigation: 'reload',
scrollPositionRestoration: 'enabled',
paramsInheritanceStrategy: 'always',
//enableTracing: true,
}),
],
...
});