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 { ContentEventsOfRepositoryComponent } from './content-events-of-repository.component';
7
import { ContentEventsOfRepoEventslistComponent } from './content-events-of-repo-eventslist.component';
8
import { ContentNotificationsOfSubscriptionComponent } from './content-notifications-of-subscription.component';
9

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

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

    
44
export class ContentRouting {}
(13-13/13)