|
@@ -1,9 +1,6 @@
|
|
|
import { NgModule } from '@angular/core';
|
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
|
import { MeComponent } from './me/me.component';
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
import { CommunityComponent } from './community/community.component';
|
|
|
import { ScienceDetailComponent } from './science-detail/science-detail.component';
|
|
|
import { ShareComponent } from './share/share.component';
|
|
@@ -20,18 +17,16 @@ import { PageTestComponent } from './page-test/page-test.component';
|
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
- { path: 'me', component: MeComponent },
|
|
|
-
|
|
|
+ { path: 'me', component: MeComponent},
|
|
|
{ path: 'community', component: CommunityComponent },
|
|
|
- { path: 'lesson', component: PageLessonComponent },
|
|
|
+ { path: 'lesson', component: PageLessonComponent, canActivate: [authGuard] },
|
|
|
{ path: 'lesson/detail', component: PageLessonDetailComponent },
|
|
|
- { path: 'page-chat', component: PageChatComponent },
|
|
|
- { path: 'page-test', component: PageTestComponent },
|
|
|
-
|
|
|
+ { path: 'page-chat', component: PageChatComponent , canActivate: [authGuard]},
|
|
|
+ { path: 'page-test', component: PageTestComponent, canActivate: [authGuard] },
|
|
|
{ path: 'community/scienceDetail', component: ScienceDetailComponent },
|
|
|
- { path: 'community/share', component: ShareComponent },
|
|
|
{ path: 'community/attentionDetail', component: AttentionDetailComponent },
|
|
|
{ path: 'community/recommendDetail', component: RecommendDetailComponent },
|
|
|
+ { path: 'community/share', component: ShareComponent },
|
|
|
{ path: "me/userFollow", component: UserFollowComponent },
|
|
|
{ path: "me/userTag", component: UserTagComponent },
|
|
|
{ path: "me/userCollection", component: UserCollectionComponent },
|