|
@@ -1,54 +1,67 @@
|
|
|
-import { Routes, RouterModule } from '@angular/router';
|
|
|
-import { PostPageComponent } from './post-page/post-page.component'; // 导入 PostPage 组件
|
|
|
-import { CommunityPage } from './community/community.page';
|
|
|
-import { SharePageComponent } from './share-page/share-page.component';
|
|
|
-import { NgModule } from '@angular/core';
|
|
|
-export const routes: Routes = [
|
|
|
- {
|
|
|
- path: '',
|
|
|
- loadChildren: () => import('./tabs/tabs.routes').then((m) => m.routes),
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'community',
|
|
|
- loadComponent: () =>
|
|
|
- import('./community/community.page').then((m) => m.CommunityPage),
|
|
|
- },
|
|
|
- { path: '', redirectTo: 'community', pathMatch: 'full' },
|
|
|
- { path: 'community', component: CommunityPage },
|
|
|
- { path: 'post-page/:id', component: PostPageComponent }, // 动态详情页面的路由
|
|
|
- { path: 'share', component: SharePageComponent },
|
|
|
-
|
|
|
- {
|
|
|
- path: 'login-page',
|
|
|
- loadComponent: () =>
|
|
|
- import('./page/login-page/login-page.page').then((m) => m.LoginPagePage),
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'register-page',
|
|
|
- loadComponent: () =>
|
|
|
- import('./page/register-page/register-page.page').then(
|
|
|
- (m) => m.RegisterPagePage
|
|
|
- ),
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'modal-edit-page',
|
|
|
- loadComponent: () =>
|
|
|
- import('./page/modal/modal-edit-page/modal-edit-page.page').then(
|
|
|
- (m) => m.ModalEditPagePage
|
|
|
- ),
|
|
|
- },
{
|
|
|
+import { Routes, RouterModule } from '@angular/router';
|
|
|
+import { PostPageComponent } from './post-page/post-page.component'; // 导入 PostPage 组件
|
|
|
+import { CommunityPage } from './community/community.page';
|
|
|
+import { SharePageComponent } from './share-page/share-page.component';
|
|
|
+import { NgModule } from '@angular/core';
|
|
|
+export const routes: Routes = [
|
|
|
+ {
|
|
|
+ path: '',
|
|
|
+ loadChildren: () => import('./tabs/tabs.routes').then((m) => m.routes),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'community',
|
|
|
+ loadComponent: () =>
|
|
|
+ import('./community/community.page').then((m) => m.CommunityPage),
|
|
|
+ },
|
|
|
+ { path: '', redirectTo: 'community', pathMatch: 'full' },
|
|
|
+ { path: 'community', component: CommunityPage },
|
|
|
+ { path: 'post-page/:id', component: PostPageComponent }, // 动态详情页面的路由
|
|
|
+ { path: 'share', component: SharePageComponent },
|
|
|
+
|
|
|
+ {
|
|
|
+ path: 'login-page',
|
|
|
+ loadComponent: () =>
|
|
|
+ import('./page/login-page/login-page.page').then((m) => m.LoginPagePage),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'register-page',
|
|
|
+ loadComponent: () =>
|
|
|
+ import('./page/register-page/register-page.page').then(
|
|
|
+ (m) => m.RegisterPagePage
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'modal-edit-page',
|
|
|
+ loadComponent: () =>
|
|
|
+ import('./page/modal/modal-edit-page/modal-edit-page.page').then(
|
|
|
+ (m) => m.ModalEditPagePage
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
path: 'modal-browse-page',
|
|
|
- loadComponent: () => import('./page/modal/modal-browse-page/modal-browse-page.page').then( m => m.ModalBrowsePagePage)
|
|
|
+ loadComponent: () =>
|
|
|
+ import('./page/modal/modal-browse-page/modal-browse-page.page').then(
|
|
|
+ (m) => m.ModalBrowsePagePage
|
|
|
+ ),
|
|
|
},
|
|
|
{
|
|
|
path: 'modal-newsedit',
|
|
|
- loadComponent: () => import('./page/modal/modal-newsedit/modal-newsedit.page').then( m => m.ModalNewseditPage)
|
|
|
+ loadComponent: () =>
|
|
|
+ import('./page/modal/modal-newsedit/modal-newsedit.page').then(
|
|
|
+ (m) => m.ModalNewseditPage
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'search-page',
|
|
|
+ loadComponent: () =>
|
|
|
+ import('./page/search-page/search-page.page').then(
|
|
|
+ (m) => m.SearchPagePage
|
|
|
+ ),
|
|
|
},
|
|
|
+];
|
|
|
|
|
|
-];
|
|
|
-
|
|
|
-@NgModule({
|
|
|
- imports: [RouterModule.forRoot(routes)],
|
|
|
- exports: [RouterModule],
|
|
|
-})
|
|
|
-export class AppRoutingModule {}
|
|
|
+@NgModule({
|
|
|
+ imports: [RouterModule.forRoot(routes)],
|
|
|
+ exports: [RouterModule],
|
|
|
+})
|
|
|
+export class AppRoutingModule {}
|