Project

General

Profile

1
import { RouterModule, Routes } from "@angular/router";
2
import { NgModule } from "@angular/core";
3
import { ContentEventsComponent } from "./content-events.component";
4
import { ContentComponent } from "./content.component";
5
import { ContentNotificationsComponent } from "./content-notifications.component";
6
import { AuthGuardService } from '../../services/auth-guard.service';
7
import { ContentEventsOfRepositoryComponent } from './content-events-of-repository.component';
8
import { ContentEventsOfRepoEventslistComponent } from './content-events-of-repo-eventslist.component';
9

    
10
const contentRoutes: Routes = [
11
  {
12
    path: 'content',
13
    component: ContentComponent,
14
//    canActivate: [AuthGuardService],
15
    children: [
16
      {
17
        path: '',
18
        redirectTo: '/events',
19
        pathMatch: 'full'
20
      },
21
      {
22
        path: 'events',
23
        component: ContentEventsComponent,
24
      },
25
      {
26
        path: 'events/:name',
27
        component: ContentEventsOfRepositoryComponent,
28
      },
29
      {
30
        path: 'events/:name/:topic',
31
        component: ContentEventsOfRepoEventslistComponent,
32
      },
33
      {
34
        path: 'notifications',
35
        component: ContentNotificationsComponent,
36
      }
37
    ]
38
  }
39
];
40

    
41
@NgModule ({
42
  imports: [RouterModule.forChild(contentRoutes)],
43
  exports: [RouterModule]
44
})
45

    
46
export class ContentRouting {}
(11-11/11)