MOBILE-4270 glossary: Fix link handler
parent
a0f1a808c7
commit
c03f656af1
|
@ -49,6 +49,12 @@ export const ADDON_MOD_GLOSSARY_SERVICES: Type<unknown>[] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const mainMenuRoutes: Routes = [
|
const mainMenuRoutes: Routes = [
|
||||||
|
// Link handlers navigation.
|
||||||
|
{
|
||||||
|
path: `${AddonModGlossaryModuleHandlerService.PAGE_NAME}/entry/:entrySlug`,
|
||||||
|
loadChildren: () => import('./glossary-entry-lazy.module').then(m => m.AddonModGlossaryEntryLazyModule),
|
||||||
|
},
|
||||||
|
|
||||||
// Course activity navigation.
|
// Course activity navigation.
|
||||||
{
|
{
|
||||||
path: AddonModGlossaryModuleHandlerService.PAGE_NAME,
|
path: AddonModGlossaryModuleHandlerService.PAGE_NAME,
|
||||||
|
|
|
@ -56,8 +56,14 @@ export class AddonModGlossaryEntryLinkHandlerService extends CoreContentLinksHan
|
||||||
);
|
);
|
||||||
|
|
||||||
await CoreNavigator.navigateToSitePath(
|
await CoreNavigator.navigateToSitePath(
|
||||||
AddonModGlossaryModuleHandlerService.PAGE_NAME + `/${module.course}/${module.id}/entry/${entryId}`,
|
`${AddonModGlossaryModuleHandlerService.PAGE_NAME}/entry/${entryId}`,
|
||||||
{ siteId },
|
{
|
||||||
|
siteId,
|
||||||
|
params: {
|
||||||
|
courseId: module.course,
|
||||||
|
cmId: module.id,
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
CoreDomUtils.showErrorModalDefault(error, 'addon.mod_glossary.errorloadingentry', true);
|
CoreDomUtils.showErrorModalDefault(error, 'addon.mod_glossary.errorloadingentry', true);
|
||||||
|
|
Loading…
Reference in New Issue