MOBILE-4653 chore: Use of default classes when importing
parent
1afe19639c
commit
62d725150e
|
@ -30,4 +30,4 @@ const routes: Routes = [
|
|||
RouterModule.forChild(routes),
|
||||
],
|
||||
})
|
||||
export class AddonBadgeLazyModule {}
|
||||
export default class AddonBadgeLazyModule {}
|
||||
|
|
|
@ -33,4 +33,4 @@ const routes: Routes = [
|
|||
AddonBadgesBadgeClassPage,
|
||||
],
|
||||
})
|
||||
export class AddonBadgeClassLazyModule {}
|
||||
export default class AddonBadgeClassLazyModule {}
|
||||
|
|
|
@ -63,4 +63,4 @@ const routes: Routes = [
|
|||
AddonBadgesUserBadgesPage,
|
||||
],
|
||||
})
|
||||
export class AddonBadgesLazyModule {}
|
||||
export default class AddonBadgesLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -86,4 +86,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
},
|
||||
],
|
||||
})
|
||||
export class AddonCalendarLazyModule {}
|
||||
export default class AddonCalendarLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -31,4 +31,4 @@ const routes: Routes = [
|
|||
AddonCompetencyCourseCompetenciesPageModule,
|
||||
],
|
||||
})
|
||||
export class AddonCompetencyCourseContentsLazyModule {}
|
||||
export default class AddonCompetencyCourseContentsLazyModule {}
|
||||
|
|
|
@ -69,4 +69,4 @@ const routes: Routes = [
|
|||
AddonCompetencyCompetencySummaryPageModule,
|
||||
],
|
||||
})
|
||||
export class AddonCompetencyCourseDetailsLazyModule {}
|
||||
export default class AddonCompetencyCourseDetailsLazyModule {}
|
||||
|
|
|
@ -89,4 +89,4 @@ const routes: Routes = [
|
|||
AddonCompetencyPlanListPage,
|
||||
],
|
||||
})
|
||||
export class AddonCompetencyLearningPlansLazyModule {}
|
||||
export default class AddonCompetencyLearningPlansLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -37,4 +37,4 @@ const routes: Routes = [
|
|||
AddonCourseCompletionReportPage,
|
||||
],
|
||||
})
|
||||
export class AddonCourseCompletionLazyModule {}
|
||||
export default class AddonCourseCompletionLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -34,4 +34,4 @@ const routes: Routes = [
|
|||
AddonMessagesSettingsPage,
|
||||
],
|
||||
})
|
||||
export class AddonMessagesSettingsLazyModule {}
|
||||
export default class AddonMessagesSettingsLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -37,4 +37,4 @@ const routes: Routes = [
|
|||
AddonNotesListPage,
|
||||
],
|
||||
})
|
||||
export class AddonNotesLazyModule {}
|
||||
export default class AddonNotesLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -78,4 +78,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
},
|
||||
],
|
||||
})
|
||||
export class AddonNotificationsLazyModule {}
|
||||
export default class AddonNotificationsLazyModule {}
|
||||
|
|
|
@ -34,4 +34,4 @@ const routes: Routes = [
|
|||
AddonNotificationsSettingsPage,
|
||||
],
|
||||
})
|
||||
export class AddonNotificationsSettingsLazyModule {}
|
||||
export default class AddonNotificationsSettingsLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -60,4 +60,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
},
|
||||
],
|
||||
})
|
||||
export class AddonPrivateFilesLazyModule {}
|
||||
export default class AddonPrivateFilesLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -33,4 +33,4 @@ const routes: Routes = [
|
|||
CoreCommentsViewerPage,
|
||||
],
|
||||
})
|
||||
export class CoreCommentsLazyModule {}
|
||||
export default class CoreCommentsLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -53,4 +53,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
CoreCourseContentsPage,
|
||||
],
|
||||
})
|
||||
export class CoreCourseContentsLazyModule {}
|
||||
export default class CoreCourseContentsLazyModule {}
|
||||
|
|
|
@ -83,4 +83,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
},
|
||||
],
|
||||
})
|
||||
export class CoreCourseLazyModule {}
|
||||
export default class CoreCourseLazyModule {}
|
||||
|
|
|
@ -35,4 +35,4 @@ const routes: Routes = [
|
|||
CoreCourseSummaryPageModule,
|
||||
],
|
||||
})
|
||||
export class CoreCourseSummaryLazyModule {}
|
||||
export default class CoreCourseSummaryLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,4 +36,4 @@ const routes: Routes = [
|
|||
CoreCoursesDashboardPage,
|
||||
],
|
||||
})
|
||||
export class CoreCoursesDashboardLazyModule {}
|
||||
export default class CoreCoursesDashboardLazyModule {}
|
||||
|
|
|
@ -79,4 +79,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
},
|
||||
],
|
||||
})
|
||||
export class CoreCoursesLazyModule {}
|
||||
export default class CoreCoursesLazyModule {}
|
||||
|
|
|
@ -39,4 +39,4 @@ const routes: Routes = [
|
|||
CoreCoursesMyPage,
|
||||
],
|
||||
})
|
||||
export class CoreCoursesMyLazyModule {}
|
||||
export default class CoreCoursesMyLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,4 +35,4 @@ const routes: Routes = [
|
|||
CoreDataPrivacyMainPage,
|
||||
],
|
||||
})
|
||||
export class CoreDataPrivacyLazyModule {}
|
||||
export default class CoreDataPrivacyLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -31,4 +31,4 @@ const routes: Routes = [
|
|||
CoreGradesCoursePageModule,
|
||||
],
|
||||
})
|
||||
export class CoreGradesCourseLazyModule {}
|
||||
export default class CoreGradesCourseLazyModule {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -62,4 +62,4 @@ const routes: Routes = [
|
|||
CoreGradesCoursesPage,
|
||||
],
|
||||
})
|
||||
export class CoreGradesCoursesLazyModule {}
|
||||
export default class CoreGradesCoursesLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -36,4 +36,4 @@ const routes: Routes = [
|
|||
CoreLoginCredentialsPage,
|
||||
],
|
||||
})
|
||||
export class CoreLoginCredentialsLazyModule {}
|
||||
export default class CoreLoginCredentialsLazyModule {}
|
||||
|
|
|
@ -78,4 +78,4 @@ const routes: Routes = [
|
|||
CoreLoginEmailSignupPage,
|
||||
],
|
||||
})
|
||||
export class CoreLoginLazyModule {}
|
||||
export default class CoreLoginLazyModule {}
|
||||
|
|
|
@ -36,4 +36,4 @@ const routes: Routes = [
|
|||
CoreLoginReconnectPage,
|
||||
],
|
||||
})
|
||||
export class CoreLoginReconnectLazyModule {}
|
||||
export default class CoreLoginReconnectLazyModule {}
|
||||
|
|
|
@ -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],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,4 +57,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
CoreMainMenuHomePage,
|
||||
],
|
||||
})
|
||||
export class CoreMainMenuHomeLazyModule {}
|
||||
export default class CoreMainMenuHomeLazyModule {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -53,4 +53,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
CoreMainMenuMorePage,
|
||||
],
|
||||
})
|
||||
export class CoreMainMenuMoreLazyModule {}
|
||||
export default class CoreMainMenuMoreLazyModule {}
|
||||
|
|
|
@ -33,4 +33,4 @@ const routes: Routes = [
|
|||
CoreMainMenuReloadPage,
|
||||
],
|
||||
})
|
||||
export class CoreMainMenuReloadLazyModule {}
|
||||
export default class CoreMainMenuReloadLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -41,4 +41,4 @@ const routes: Routes = [
|
|||
CorePolicyAcceptancesPage,
|
||||
],
|
||||
})
|
||||
export class CorePolicyLazyModule {}
|
||||
export default class CorePolicyLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -41,4 +41,4 @@ const routes: Routes = [
|
|||
CoreReportBuilderReportPage,
|
||||
],
|
||||
})
|
||||
export class CoreReportBuilderLazyModule {}
|
||||
export default class CoreReportBuilderLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -50,4 +50,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
},
|
||||
],
|
||||
})
|
||||
export class CoreSearchLazyModule {}
|
||||
export default class CoreSearchLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -61,4 +61,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
CoreSharedModule,
|
||||
],
|
||||
})
|
||||
export class CoreettingsSiteLazyModule {}
|
||||
export default class CoreettingsSiteLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -42,4 +42,4 @@ const routes: Routes = [
|
|||
CoreSharedFilesChooseSitePage,
|
||||
],
|
||||
})
|
||||
export class CoreSharedFilesLazyModule {}
|
||||
export default class CoreSharedFilesLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -38,4 +38,4 @@ const routes: Routes = [
|
|||
CoreSiteHomeIndexPage,
|
||||
],
|
||||
})
|
||||
export class CoreSiteHomeLazyModule {}
|
||||
export default class CoreSiteHomeLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -95,4 +95,4 @@ function buildRoutes(injector: Injector): Routes {
|
|||
},
|
||||
],
|
||||
})
|
||||
export class CoreTagLazyModule {}
|
||||
export default class CoreTagLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -33,4 +33,4 @@ const routes: Routes = [
|
|||
CoreUserCompleteProfilePage,
|
||||
],
|
||||
})
|
||||
export class CoreUserAppLazyModule {}
|
||||
export default class CoreUserAppLazyModule {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -34,4 +34,4 @@ const routes: Routes = [
|
|||
CoreUserProfilePage,
|
||||
],
|
||||
})
|
||||
export class CoreUserProfileLazyModule {}
|
||||
export default class CoreUserProfileLazyModule {}
|
||||
|
|
|
@ -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'),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue