MOBILE-4653 chore: Use of default classes when importing

main
Pau Ferrer Ocaña 2024-10-29 11:25:35 +01:00
parent 1afe19639c
commit 62d725150e
74 changed files with 118 additions and 108 deletions

View File

@ -30,4 +30,4 @@ const routes: Routes = [
RouterModule.forChild(routes),
],
})
export class AddonBadgeLazyModule {}
export default class AddonBadgeLazyModule {}

View File

@ -33,4 +33,4 @@ const routes: Routes = [
AddonBadgesBadgeClassPage,
],
})
export class AddonBadgeClassLazyModule {}
export default class AddonBadgeClassLazyModule {}

View File

@ -63,4 +63,4 @@ const routes: Routes = [
AddonBadgesUserBadgesPage,
],
})
export class AddonBadgesLazyModule {}
export default class AddonBadgesLazyModule {}

View File

@ -43,15 +43,15 @@ export async function getBadgesServices(): Promise<Type<unknown>[]> {
const mainMenuRoutes: Routes = [
{
path: 'badge',
loadChildren: () => import('./badge-lazy.module').then(m => m.AddonBadgeLazyModule),
loadChildren: () => import('./badge-lazy.module'),
},
{
path: 'badges',
loadChildren: () => import('./badges-lazy.module').then(m => m.AddonBadgesLazyModule),
loadChildren: () => import('./badges-lazy.module'),
},
{
path: 'badgeclass',
loadChildren: () => import('./badgeclass-lazy.module').then(m => m.AddonBadgeClassLazyModule),
loadChildren: () => import('./badgeclass-lazy.module'),
},
];

View File

@ -42,7 +42,7 @@ import { canLeaveGuard } from '@guards/can-leave';
},
{
path: 'edit/:id',
loadComponent: () => import('./pages/edit-entry/edit-entry').then(c => c.AddonBlogEditEntryPage),
loadComponent: () => import('./pages/edit-entry/edit-entry'),
canDeactivate: [canLeaveGuard],
},
...buildTabMainRoutes(injector, {
@ -71,4 +71,4 @@ import { canLeaveGuard } from '@guards/can-leave';
},
],
})
export class AddonBlogLazyModule {}
export default class AddonBlogLazyModule {}

View File

@ -37,7 +37,7 @@ import { AddonBlogSyncCronHandler } from './services/handlers/sync-cron';
const routes: Routes = [
{
path: ADDON_BLOG_MAINMENU_PAGE_NAME,
loadChildren: () => import('@addons/blog/blog-lazy.module').then(m => m.AddonBlogLazyModule),
loadChildren: () => import('@addons/blog/blog-lazy.module'),
},
];

View File

@ -59,7 +59,7 @@ import { CoreTimeUtils } from '@services/utils/time';
CoreTagComponentsModule,
],
})
export class AddonBlogEditEntryPage implements CanLeave, OnInit, OnDestroy {
export default class AddonBlogEditEntryPage implements CanLeave, OnInit, OnDestroy {
@ViewChild('editEntryForm') formElement!: ElementRef;

View File

@ -86,4 +86,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class AddonCalendarLazyModule {}
export default class AddonCalendarLazyModule {}

View File

@ -52,7 +52,7 @@ export async function getCalendarServices(): Promise<Type<unknown>[]> {
const mainMenuChildrenRoutes: Routes = [
{
path: AddonCalendarMainMenuHandlerService.PAGE_NAME,
loadChildren: () => import('./calendar-lazy.module').then(m => m.AddonCalendarLazyModule),
loadChildren: () => import('./calendar-lazy.module'),
},
];

View File

@ -31,4 +31,4 @@ const routes: Routes = [
AddonCompetencyCourseCompetenciesPageModule,
],
})
export class AddonCompetencyCourseContentsLazyModule {}
export default class AddonCompetencyCourseContentsLazyModule {}

View File

@ -69,4 +69,4 @@ const routes: Routes = [
AddonCompetencyCompetencySummaryPageModule,
],
})
export class AddonCompetencyCourseDetailsLazyModule {}
export default class AddonCompetencyCourseDetailsLazyModule {}

View File

@ -89,4 +89,4 @@ const routes: Routes = [
AddonCompetencyPlanListPage,
],
})
export class AddonCompetencyLearningPlansLazyModule {}
export default class AddonCompetencyLearningPlansLazyModule {}

View File

@ -49,22 +49,22 @@ export async function getCompetencyServices(): Promise<Type<unknown>[]> {
const mainMenuChildrenRoutes: Routes = [
{
path: ADDON_COMPETENCY_LEARNING_PLANS_PAGE,
loadChildren: () => import('./competency-learning-plans-lazy.module').then(m => m.AddonCompetencyLearningPlansLazyModule),
loadChildren: () => import('./competency-learning-plans-lazy.module'),
},
{
path: `${COURSE_PAGE_NAME}/:courseId/${ADDON_COMPETENCY_COMPETENCIES_PAGE}`,
loadChildren: () => import('./competency-course-details-lazy.module').then(m => m.AddonCompetencyCourseDetailsLazyModule),
loadChildren: () => import('./competency-course-details-lazy.module'),
},
{
path: `${COURSE_PAGE_NAME}/:courseId/${PARTICIPANTS_PAGE_NAME}/:userId/${ADDON_COMPETENCY_COMPETENCIES_PAGE}`,
loadChildren: () => import('./competency-course-details-lazy.module').then(m => m.AddonCompetencyCourseDetailsLazyModule),
loadChildren: () => import('./competency-course-details-lazy.module'),
},
];
const courseIndexRoutes: Routes = [
{
path: ADDON_COMPETENCY_COMPETENCIES_PAGE,
loadChildren: () => import('./competency-course-contents-lazy.module').then(m => m.AddonCompetencyCourseContentsLazyModule),
loadChildren: () => import('./competency-course-contents-lazy.module'),
},
];

View File

@ -37,4 +37,4 @@ const routes: Routes = [
AddonCourseCompletionReportPage,
],
})
export class AddonCourseCompletionLazyModule {}
export default class AddonCourseCompletionLazyModule {}

View File

@ -39,7 +39,7 @@ export async function getCourseCompletionServices(): Promise<Type<unknown>[]> {
const routes: Routes = [
{
path: 'coursecompletion',
loadChildren: () => import('./coursecompletion-lazy.module').then(m => m.AddonCourseCompletionLazyModule),
loadChildren: () => import('./coursecompletion-lazy.module'),
},
];

View File

@ -117,7 +117,7 @@ function buildRoutes(injector: Injector): Routes {
...discussionRoutes,
{
path: 'message-settings',
loadChildren: () => import('./messages-settings-lazy.module').then(m => m.AddonMessagesSettingsLazyModule),
loadChildren: () => import('./messages-settings-lazy.module'),
},
...buildTabMainRoutes(injector, {
canActivate: [messagesIndexGuard],
@ -148,4 +148,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class AddonMessagesLazyModule {}
export default class AddonMessagesLazyModule {}

View File

@ -34,4 +34,4 @@ const routes: Routes = [
AddonMessagesSettingsPage,
],
})
export class AddonMessagesSettingsLazyModule {}
export default class AddonMessagesSettingsLazyModule {}

View File

@ -58,13 +58,13 @@ export async function getMessagesServices(): Promise<Type<unknown>[]> {
const mainMenuChildrenRoutes: Routes = [
{
path: AddonMessagesMainMenuHandlerService.PAGE_NAME,
loadChildren: () => import('./messages-lazy.module').then(m => m.AddonMessagesLazyModule),
loadChildren: () => import('./messages-lazy.module'),
},
];
const preferencesRoutes: Routes = [
{
path: AddonMessagesSettingsHandlerService.PAGE_NAME,
loadChildren: () => import('./messages-settings-lazy.module').then(m => m.AddonMessagesSettingsLazyModule),
loadChildren: () => import('./messages-settings-lazy.module'),
},
];

View File

@ -37,4 +37,4 @@ const routes: Routes = [
AddonNotesListPage,
],
})
export class AddonNotesLazyModule {}
export default class AddonNotesLazyModule {}

View File

@ -45,7 +45,7 @@ export async function getNotesServices(): Promise<Type<unknown>[]> {
const routes: Routes = [
{
path: 'notes',
loadChildren: () => import('@addons/notes/notes-lazy.module').then(m => m.AddonNotesLazyModule),
loadChildren: () => import('@addons/notes/notes-lazy.module'),
},
];

View File

@ -78,4 +78,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class AddonNotificationsLazyModule {}
export default class AddonNotificationsLazyModule {}

View File

@ -34,4 +34,4 @@ const routes: Routes = [
AddonNotificationsSettingsPage,
],
})
export class AddonNotificationsSettingsLazyModule {}
export default class AddonNotificationsSettingsLazyModule {}

View File

@ -48,13 +48,13 @@ export async function getNotificationsServices(): Promise<Type<unknown>[]> {
const routes: Routes = [
{
path: AddonNotificationsMainMenuHandlerService.PAGE_NAME,
loadChildren: () => import('./notifications-lazy.module').then(m => m.AddonNotificationsLazyModule),
loadChildren: () => import('./notifications-lazy.module'),
},
];
const preferencesRoutes: Routes = [
{
path: AddonNotificationsSettingsHandlerService.PAGE_NAME,
loadChildren: () => import('./notifications-settings-lazy.module').then(m => m.AddonNotificationsSettingsLazyModule),
loadChildren: () => import('./notifications-settings-lazy.module'),
},
];

View File

@ -60,4 +60,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class AddonPrivateFilesLazyModule {}
export default class AddonPrivateFilesLazyModule {}

View File

@ -38,7 +38,7 @@ export async function getPrivateFilesServices(): Promise<Type<unknown>[]> {
const routes: Routes = [
{
path: AddonPrivateFilesUserHandlerService.PAGE_NAME,
loadChildren: () => import('@addons/privatefiles/privatefiles-lazy.module').then(m => m.AddonPrivateFilesLazyModule),
loadChildren: () => import('@addons/privatefiles/privatefiles-lazy.module'),
},
];

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { InjectionToken, Injector, ModuleWithProviders, NgModule, Type } from '@angular/core';
import { InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactory, Type } from '@angular/core';
import {
RouterModule,
Route,
@ -22,7 +22,9 @@ import {
UrlMatchResult,
UrlSegment,
UrlSegmentGroup,
DefaultExport,
} from '@angular/router';
import { Observable } from 'rxjs';
const modulesRoutes: WeakMap<InjectionToken<unknown>, ModuleRoutes> = new WeakMap();
@ -97,10 +99,18 @@ function buildConditionalUrlMatcher(pathOrMatcher: string | UrlMatcher, conditio
}
/**
* Type to declare lazy route modules.
* Type to declare lazy route modules. Extracted from Angular's LoadChildrenCallback type.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type LazyRoutesModule = Type<any>;
export type LazyRoutesModule = Type<any> |
NgModuleFactory<any> | // eslint-disable-line deprecation/deprecation, @typescript-eslint/no-explicit-any
Routes |
Observable<Type<any> | // eslint-disable-line @typescript-eslint/no-explicit-any
Routes |
DefaultExport<Type<any>> | // eslint-disable-line @typescript-eslint/no-explicit-any
DefaultExport<Routes>> |
// eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-explicit-any
Promise<NgModuleFactory<any> | Type<any> | Routes | DefaultExport<Type<any>> |DefaultExport<Routes>>;
/**
* Build url matcher using a regular expression.

View File

@ -33,4 +33,4 @@ const routes: Routes = [
CoreCommentsViewerPage,
],
})
export class CoreCommentsLazyModule {}
export default class CoreCommentsLazyModule {}

View File

@ -42,7 +42,7 @@ export async function getCommentsServices(): Promise<Type<unknown>[]> {
const routes: Routes = [
{
path: 'comments',
loadChildren: () => import('@features/comments/comments-lazy.module').then(m => m.CoreCommentsLazyModule),
loadChildren: () => import('@features/comments/comments-lazy.module'),
},
];

View File

@ -53,4 +53,4 @@ function buildRoutes(injector: Injector): Routes {
CoreCourseContentsPage,
],
})
export class CoreCourseContentsLazyModule {}
export default class CoreCourseContentsLazyModule {}

View File

@ -83,4 +83,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class CoreCourseLazyModule {}
export default class CoreCourseLazyModule {}

View File

@ -35,4 +35,4 @@ const routes: Routes = [
CoreCourseSummaryPageModule,
],
})
export class CoreCourseSummaryLazyModule {}
export default class CoreCourseSummaryLazyModule {}

View File

@ -112,14 +112,14 @@ export async function getCourseStandaloneComponents(): Promise<Type<unknown>[]>
const routes: Routes = [
{
matcher: buildRegExpUrlMatcher(new RegExp(`^${COURSE_PAGE_NAME}(/deep)*`)),
loadChildren: () => import('@features/course/course-lazy.module').then(m => m.CoreCourseLazyModule),
loadChildren: () => import('@features/course/course-lazy.module'),
},
];
const courseIndexRoutes: Routes = [
{
path: CONTENTS_PAGE_NAME,
loadChildren: () => import('@features/course/course-contents-lazy.module').then(m => m.CoreCourseContentsLazyModule),
loadChildren: () => import('@features/course/course-contents-lazy.module'),
},
];

View File

@ -1963,8 +1963,8 @@ export class CoreCourseHelperProvider {
*
* @returns Course summary page module.
*/
async getCourseSummaryRouteModule(): Promise<LazyRoutesModule> {
return import('../course-summary-lazy.module').then(m => m.CoreCourseSummaryLazyModule);
getCourseSummaryRouteModule(): LazyRoutesModule {
return import('../course-summary-lazy.module');
}
/**

View File

@ -36,4 +36,4 @@ const routes: Routes = [
CoreCoursesDashboardPage,
],
})
export class CoreCoursesDashboardLazyModule {}
export default class CoreCoursesDashboardLazyModule {}

View File

@ -79,4 +79,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class CoreCoursesLazyModule {}
export default class CoreCoursesLazyModule {}

View File

@ -39,4 +39,4 @@ const routes: Routes = [
CoreCoursesMyPage,
],
})
export class CoreCoursesMyLazyModule {}
export default class CoreCoursesMyLazyModule {}

View File

@ -60,14 +60,14 @@ export async function getCoursesServices(): Promise<Type<unknown>[]> {
const mainMenuHomeChildrenRoutes: Routes = [
{
path: CoreDashboardHomeHandlerService.PAGE_NAME,
loadChildren: () => import('./courses-dashboard-lazy.module').then(m => m.CoreCoursesDashboardLazyModule),
loadChildren: () => import('./courses-dashboard-lazy.module'),
},
];
const routes: Routes = [
{
path: CoreCoursesMyCoursesMainMenuHandlerService.PAGE_NAME,
loadChildren: () => import('./courses-lazy.module').then(m => m.CoreCoursesLazyModule),
loadChildren: () => import('./courses-lazy.module'),
},
];

View File

@ -435,8 +435,8 @@ export class CoreCoursesHelperProvider {
*
* @returns My courses page module.
*/
async getMyRouteModule(): Promise<LazyRoutesModule> {
return import('../courses-my-lazy.module').then(m => m.CoreCoursesMyLazyModule);
getMyRouteModule(): LazyRoutesModule {
return import('../courses-my-lazy.module');
}
/**

View File

@ -35,4 +35,4 @@ const routes: Routes = [
CoreDataPrivacyMainPage,
],
})
export class CoreDataPrivacyLazyModule {}
export default class CoreDataPrivacyLazyModule {}

View File

@ -25,7 +25,7 @@ import { CoreDataPrivacyCreateDataRequestLinkHandler } from './services/handlers
const routes: Routes = [
{
path: CORE_DATAPRIVACY_PAGE_NAME,
loadChildren: () => import('./dataprivacy-lazy.module').then(m => m.CoreDataPrivacyLazyModule),
loadChildren: () => import('./dataprivacy-lazy.module'),
},
];

View File

@ -31,4 +31,4 @@ const routes: Routes = [
CoreGradesCoursePageModule,
],
})
export class CoreGradesCourseLazyModule {}
export default class CoreGradesCourseLazyModule {}

View File

@ -27,7 +27,7 @@ const routes: Routes = [
children: conditionalRoutes([
{
path: ':userId',
loadChildren: () => import('./grades-course-lazy.module').then(m => m.CoreGradesCourseLazyModule),
loadChildren: () => import('./grades-course-lazy.module'),
data: { swipeManagerSource: 'participants' },
},
], () => CoreScreen.isTablet),
@ -40,4 +40,4 @@ const routes: Routes = [
CoreUserParticipantsPageModule,
],
})
export class CoreGradesCourseParticipantsLazyModule {}
export default class CoreGradesCourseParticipantsLazyModule {}

View File

@ -62,4 +62,4 @@ const routes: Routes = [
CoreGradesCoursesPage,
],
})
export class CoreGradesCoursesLazyModule {}
export default class CoreGradesCoursesLazyModule {}

View File

@ -49,17 +49,17 @@ export async function getGradesServices(): Promise<Type<unknown>[]> {
const mainMenuChildrenRoutes: Routes = [
{
path: GRADES_PAGE_NAME,
loadChildren: () => import('./grades-courses-lazy.module').then(m => m.CoreGradesCoursesLazyModule),
loadChildren: () => import('./grades-courses-lazy.module'),
data: { swipeManagerSource: 'courses' },
},
{
path: `${COURSE_PAGE_NAME}/:courseId/${PARTICIPANTS_PAGE_NAME}/:userId/${GRADES_PAGE_NAME}`,
loadChildren: () => import('./grades-course-lazy.module').then(m => m.CoreGradesCourseLazyModule),
loadChildren: () => import('./grades-course-lazy.module'),
},
...conditionalRoutes([
{
path: `${COURSE_PAGE_NAME}/${COURSE_INDEX_PATH}/${GRADES_PARTICIPANTS_PAGE_NAME}/:userId`,
loadChildren: () => import('./grades-course-lazy.module').then(m => m.CoreGradesCourseLazyModule),
loadChildren: () => import('./grades-course-lazy.module'),
data: { swipeManagerSource: 'participants' },
},
], () => CoreScreen.isMobile),
@ -68,11 +68,11 @@ const mainMenuChildrenRoutes: Routes = [
const courseIndexRoutes: Routes = [
{
path: GRADES_PAGE_NAME,
loadChildren: () => import('./grades-course-lazy.module').then(m => m.CoreGradesCourseLazyModule),
loadChildren: () => import('./grades-course-lazy.module'),
},
{
path: GRADES_PARTICIPANTS_PAGE_NAME,
loadChildren: () => import('./grades-course-participants-lazy.module').then(m => m.CoreGradesCourseParticipantsLazyModule),
loadChildren: () => import('./grades-course-participants-lazy.module'),
},
];

View File

@ -36,4 +36,4 @@ const routes: Routes = [
CoreLoginCredentialsPage,
],
})
export class CoreLoginCredentialsLazyModule {}
export default class CoreLoginCredentialsLazyModule {}

View File

@ -78,4 +78,4 @@ const routes: Routes = [
CoreLoginEmailSignupPage,
],
})
export class CoreLoginLazyModule {}
export default class CoreLoginLazyModule {}

View File

@ -36,4 +36,4 @@ const routes: Routes = [
CoreLoginReconnectPage,
],
})
export class CoreLoginReconnectLazyModule {}
export default class CoreLoginReconnectLazyModule {}

View File

@ -38,7 +38,7 @@ export async function getLoginServices(): Promise<Type<unknown>[]> {
const appRoutes: Routes = [
{
path: 'login',
loadChildren: () => import('./login-lazy.module').then(m => m.CoreLoginLazyModule),
loadChildren: () => import('./login-lazy.module'),
canActivate: [redirectGuard],
},
];

View File

@ -1451,8 +1451,8 @@ export class CoreLoginHelperProvider {
*
* @returns Reconnect page route module.
*/
async getReconnectRouteModule(): Promise<LazyRoutesModule> {
return import('@features/login/login-reconnect-lazy.module').then(m => m.CoreLoginReconnectLazyModule);
getReconnectRouteModule(): LazyRoutesModule {
return import('@features/login/login-reconnect-lazy.module');
}
/**
@ -1460,8 +1460,8 @@ export class CoreLoginHelperProvider {
*
* @returns Credentials page route module.
*/
async getCredentialsRouteModule(): Promise<LazyRoutesModule> {
return import('@features/login/login-credentials-lazy.module').then(m => m.CoreLoginCredentialsLazyModule);
getCredentialsRouteModule(): LazyRoutesModule {
return import('@features/login/login-credentials-lazy.module');
}
/**

View File

@ -57,4 +57,4 @@ function buildRoutes(injector: Injector): Routes {
CoreMainMenuHomePage,
],
})
export class CoreMainMenuHomeLazyModule {}
export default class CoreMainMenuHomeLazyModule {}

View File

@ -38,11 +38,11 @@ function buildRoutes(injector: Injector): Routes {
children: [
{
path: CoreMainMenuHomeHandlerService.PAGE_NAME,
loadChildren: () => import('./mainmenu-home-lazy.module').then(m => m.CoreMainMenuHomeLazyModule),
loadChildren: () => import('./mainmenu-home-lazy.module'),
},
{
path: CoreMainMenuProvider.MORE_PAGE_NAME,
loadChildren: () => import('./mainmenu-more-lazy.module').then(m => m.CoreMainMenuMoreLazyModule),
loadChildren: () => import('./mainmenu-more-lazy.module'),
},
...mainMenuRoutes.children,
],
@ -63,4 +63,4 @@ function buildRoutes(injector: Injector): Routes {
{ provide: ROUTES, multi: true, useFactory: buildRoutes, deps: [Injector] },
],
})
export class CoreMainMenuLazyModule {}
export default class CoreMainMenuLazyModule {}

View File

@ -53,4 +53,4 @@ function buildRoutes(injector: Injector): Routes {
CoreMainMenuMorePage,
],
})
export class CoreMainMenuMoreLazyModule {}
export default class CoreMainMenuMoreLazyModule {}

View File

@ -33,4 +33,4 @@ const routes: Routes = [
CoreMainMenuReloadPage,
],
})
export class CoreMainMenuReloadLazyModule {}
export default class CoreMainMenuReloadLazyModule {}

View File

@ -46,12 +46,12 @@ const appRoutes: Routes = [
},
{
path: 'main',
loadChildren: () => import('./mainmenu-lazy.module').then(m => m.CoreMainMenuLazyModule),
loadChildren: () => import('./mainmenu-lazy.module'),
canActivate: [authGuard],
},
{
path: 'reload',
loadChildren: () => import('./mainmenu-reload-lazy.module').then( m => m.CoreMainMenuReloadLazyModule),
loadChildren: () => import('./mainmenu-reload-lazy.module'),
},
];

View File

@ -41,4 +41,4 @@ const routes: Routes = [
CorePolicyAcceptancesPage,
],
})
export class CorePolicyLazyModule {}
export default class CorePolicyLazyModule {}

View File

@ -27,7 +27,7 @@ import { CoreContentLinksDelegate } from '@features/contentlinks/services/conten
const routes: Routes = [
{
path: POLICY_PAGE_NAME,
loadChildren: () => import('./policy-lazy.module').then(m => m.CorePolicyLazyModule),
loadChildren: () => import('./policy-lazy.module'),
},
];

View File

@ -41,4 +41,4 @@ const routes: Routes = [
CoreReportBuilderReportPage,
],
})
export class CoreReportBuilderLazyModule {}
export default class CoreReportBuilderLazyModule {}

View File

@ -23,7 +23,7 @@ import { CoreReportBuilderHandler, CoreReportBuilderHandlerService } from './ser
const routes: Routes = [
{
path: CoreReportBuilderHandlerService.PAGE_NAME,
loadChildren: () => import('./reportbuilder-lazy.module').then(m => m.CoreReportBuilderLazyModule),
loadChildren: () => import('./reportbuilder-lazy.module'),
},
];

View File

@ -50,4 +50,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class CoreSearchLazyModule {}
export default class CoreSearchLazyModule {}

View File

@ -44,7 +44,7 @@ export async function getSearchServices(): Promise<Type<unknown>[]> {
const mainMenuChildrenRoutes: Routes = [
{
path: CORE_SEARCH_PAGE_NAME,
loadChildren: () => import('./search-lazy.module').then(m => m.CoreSearchLazyModule),
loadChildren: () => import('./search-lazy.module'),
},
];

View File

@ -45,7 +45,7 @@ const sectionRoutes: Routes = [
},
{
path: SHAREDFILES_PAGE_NAME,
loadChildren: () => import('@features/sharedfiles/sharedfiles-lazy.module').then(m => m.CoreSharedFilesLazyModule),
loadChildren: () => import('@features/sharedfiles/sharedfiles-lazy.module'),
},
{
path: 'about',
@ -114,4 +114,4 @@ const routes: Routes = [
CoreSettingsErrorLogPage,
],
})
export class CoreSettingsLazyModule {}
export default class CoreSettingsLazyModule {}

View File

@ -61,4 +61,4 @@ function buildRoutes(injector: Injector): Routes {
CoreSharedModule,
],
})
export class CoreettingsSiteLazyModule {}
export default class CoreettingsSiteLazyModule {}

View File

@ -37,18 +37,18 @@ export async function getSettingsServices(): Promise<Type<unknown>[]> {
const appRoutes: Routes = [
{
path: 'settings',
loadChildren: () => import('./settings-lazy.module').then(m => m.CoreSettingsLazyModule),
loadChildren: () => import('./settings-lazy.module'),
},
];
const mainMenuMoreRoutes: Routes = [
{
path: 'settings',
loadChildren: () => import('./settings-lazy.module').then(m => m.CoreSettingsLazyModule),
loadChildren: () => import('./settings-lazy.module'),
},
{
path: 'preferences',
loadChildren: () => import('./settings-site-lazy.module').then(m => m.CoreettingsSiteLazyModule),
loadChildren: () => import('./settings-site-lazy.module'),
},
];

View File

@ -42,4 +42,4 @@ const routes: Routes = [
CoreSharedFilesChooseSitePage,
],
})
export class CoreSharedFilesLazyModule {}
export default class CoreSharedFilesLazyModule {}

View File

@ -45,7 +45,7 @@ export async function getSharedFilesServices(): Promise<Type<unknown>[]> {
const routes: Routes = [
{
path: SHAREDFILES_PAGE_NAME,
loadChildren: () => import('./sharedfiles-lazy.module').then(m => m.CoreSharedFilesLazyModule),
loadChildren: () => import('./sharedfiles-lazy.module'),
},
];

View File

@ -38,4 +38,4 @@ const routes: Routes = [
CoreSiteHomeIndexPage,
],
})
export class CoreSiteHomeLazyModule {}
export default class CoreSiteHomeLazyModule {}

View File

@ -37,7 +37,7 @@ export async function getSiteHomeServices(): Promise<Type<unknown>[]> {
const mainMenuHomeRoutes: Routes = [
{
path: CoreSiteHomeHomeHandlerService.PAGE_NAME,
loadChildren: () => import('./sitehome-lazy.module').then(m => m.CoreSiteHomeLazyModule),
loadChildren: () => import('./sitehome-lazy.module'),
},
];

View File

@ -95,4 +95,4 @@ function buildRoutes(injector: Injector): Routes {
},
],
})
export class CoreTagLazyModule {}
export default class CoreTagLazyModule {}

View File

@ -43,7 +43,7 @@ export async function getTagServices(): Promise<Type<unknown>[]> {
const routes: Routes = [
{
path: CoreTagMainMenuHandlerService.PAGE_NAME,
loadChildren: () => import('./tag-lazy.module').then(m => m.CoreTagLazyModule),
loadChildren: () => import('./tag-lazy.module'),
},
];

View File

@ -33,4 +33,4 @@ const routes: Routes = [
CoreUserCompleteProfilePage,
],
})
export class CoreUserAppLazyModule {}
export default class CoreUserAppLazyModule {}

View File

@ -27,7 +27,7 @@ const routes: Routes = [
children: conditionalRoutes([
{
path: ':userId',
loadChildren: () => import('@features/user/user-profile-lazy.module').then(m => m.CoreUserProfileLazyModule),
loadChildren: () => import('@features/user/user-profile-lazy.module'),
data: { swipeManagerSource: 'participants' },
},
], () => CoreScreen.isTablet),
@ -40,4 +40,4 @@ const routes: Routes = [
CoreUserParticipantsPageModule,
],
})
export class CoreUserCourseLazyModule {}
export default class CoreUserCourseLazyModule {}

View File

@ -26,7 +26,7 @@ const routes: Routes = [
},
{
path: 'profile',
loadChildren: () => import('./user-profile-lazy.module').then( m => m.CoreUserProfileLazyModule),
loadChildren: () => import('./user-profile-lazy.module'),
},
{
path: 'about',
@ -44,4 +44,4 @@ const routes: Routes = [
CoreUserAboutPage,
],
})
export class CoreUserLazyModule {}
export default class CoreUserLazyModule {}

View File

@ -34,4 +34,4 @@ const routes: Routes = [
CoreUserProfilePage,
],
})
export class CoreUserProfileLazyModule {}
export default class CoreUserProfileLazyModule {}

View File

@ -63,19 +63,19 @@ export async function getUsersServices(): Promise<Type<unknown>[]> {
const appRoutes: Routes = [
{
path: 'user',
loadChildren: () => import('@features/user/user-app-lazy.module').then(m => m.CoreUserAppLazyModule),
loadChildren: () => import('@features/user/user-app-lazy.module'),
},
];
const routes: Routes = [
{
path: 'user',
loadChildren: () => import('@features/user/user-lazy.module').then(m => m.CoreUserLazyModule),
loadChildren: () => import('@features/user/user-lazy.module'),
},
...conditionalRoutes([
{
path: `${COURSE_PAGE_NAME}/${COURSE_INDEX_PATH}/${PARTICIPANTS_PAGE_NAME}/:userId`,
loadChildren: () => import('@features/user/user-profile-lazy.module').then(m => m.CoreUserProfileLazyModule),
loadChildren: () => import('@features/user/user-profile-lazy.module'),
data: {
swipeManagerSource: 'participants',
},
@ -86,7 +86,7 @@ const routes: Routes = [
const courseIndexRoutes: Routes = [
{
path: PARTICIPANTS_PAGE_NAME,
loadChildren: () => import('@features/user/user-course-lazy.module').then(m => m.CoreUserCourseLazyModule),
loadChildren: () => import('@features/user/user-course-lazy.module'),
},
];