|
@@ -1,69 +1,73 @@
|
|
|
-import { NgModule } from '@angular/core';
|
|
|
-import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
|
|
-// 引用路由守卫
|
|
|
-import { authGuard } from 'src/modules/user/auth.guard';
|
|
|
+import { NgModule } from '@angular/core';
|
|
|
+import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
|
|
+// 引用路由守卫
|
|
|
+import { authGuard } from 'src/modules/user/auth.guard';
|
|
|
+
|
|
|
+const routes: Routes = [
|
|
|
+ {
|
|
|
+ path: '',
|
|
|
+ loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'tab4',
|
|
|
+ loadChildren: () => import('./tab4/tab4.module').then( m => m.Tab4PageModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'feedback',
|
|
|
+ loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'settings',
|
|
|
+ loadChildren: () => import('./settings/settings.module').then( m => m.SettingsPageModule)
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // path: 'login',
|
|
|
+ // loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ path: 'edit-profile',
|
|
|
+ loadChildren: () => import('./edit-profile/edit-profile.module').then( m => m.EditProfilePageModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'notification-settings',
|
|
|
+ loadChildren: () => import('./notification-settings/notification-settings.module').then( m => m.NotificationSettingsPageModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'privacy',
|
|
|
+ loadChildren: () => import('./privacy/privacy.module').then( m => m.PrivacyPageModule)
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ path: 'theme-settings',
|
|
|
+ loadChildren: () => import('./theme-settings/theme-settings.module').then( m => m.ThemeSettingsPageModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'language-settings',
|
|
|
+ loadChildren: () => import('./language-settings/language-settings.module').then( m => m.LanguageSettingsPageModule)
|
|
|
+ },
|
|
|
+ // 添加:
|
|
|
+ {
|
|
|
+ path: 'user',
|
|
|
+ loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'following',
|
|
|
+ loadChildren: () => import('./following/following.module').then( m => m.FollowingPageModule)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'follower',
|
|
|
+ loadChildren: () => import('./follower/follower.module').then( m => m.FollowerPageModule)
|
|
|
+ },
{
|
|
|
+ path: 'creator',
|
|
|
+ loadChildren: () => import('./creator/creator.module').then( m => m.CreatorPageModule)
|
|
|
+ }
|
|
|
|
|
|
-const routes: Routes = [
|
|
|
- {
|
|
|
- path: '',
|
|
|
- loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'tab4',
|
|
|
- loadChildren: () => import('./tab4/tab4.module').then( m => m.Tab4PageModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'feedback',
|
|
|
- loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'settings',
|
|
|
- loadChildren: () => import('./settings/settings.module').then( m => m.SettingsPageModule)
|
|
|
- },
|
|
|
- // {
|
|
|
- // path: 'login',
|
|
|
- // loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
|
|
|
- // },
|
|
|
- {
|
|
|
- path: 'edit-profile',
|
|
|
- loadChildren: () => import('./edit-profile/edit-profile.module').then( m => m.EditProfilePageModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'notification-settings',
|
|
|
- loadChildren: () => import('./notification-settings/notification-settings.module').then( m => m.NotificationSettingsPageModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'privacy',
|
|
|
- loadChildren: () => import('./privacy/privacy.module').then( m => m.PrivacyPageModule)
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: 'theme-settings',
|
|
|
- loadChildren: () => import('./theme-settings/theme-settings.module').then( m => m.ThemeSettingsPageModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'language-settings',
|
|
|
- loadChildren: () => import('./language-settings/language-settings.module').then( m => m.LanguageSettingsPageModule)
|
|
|
- },
|
|
|
- // 添加:
|
|
|
- {
|
|
|
- path: 'user',
|
|
|
- loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'following',
|
|
|
- loadChildren: () => import('./following/following.module').then( m => m.FollowingPageModule)
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'follower',
|
|
|
- loadChildren: () => import('./follower/follower.module').then( m => m.FollowerPageModule)
|
|
|
- }
|
|
|
-
|
|
|
-];
|
|
|
-@NgModule({
|
|
|
- imports: [
|
|
|
- RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
|
|
- ],
|
|
|
- exports: [RouterModule]
|
|
|
-})
|
|
|
+
|
|
|
+];
|
|
|
+@NgModule({
|
|
|
+ imports: [
|
|
|
+ RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
|
|
+ ],
|
|
|
+ exports: [RouterModule]
|
|
|
+})
|
|
|
export class AppRoutingModule {}
|