socialnetworknews-web

A open-source Paper.li clone
git clone git://archive.git.mtrnord.blog/SocialNetworkNews/socialnetworknews-web.git
Log | Files | Refs | README | LICENSE

app.routing.ts (1221B)


      1 import {NgModule} from '@angular/core';
      2 import {RouterModule, Routes} from '@angular/router';
      3 import {MainComponent} from './main/main.component';
      4 import {PaperComponent} from './paper/paper.component';
      5 import {PapersComponent} from './papers/papers.component';
      6 import {LoginComponent} from './login/login.component';
      7 import { TwitterComponent as CallbackTwitterComponent } from './callback/twitter/twitter.component';
      8 import {ProfileComponent} from './user/profile/profile.component';
      9 import {SettingsComponent} from './user/settings/settings.component';
     10 
     11 const routes: Routes = [
     12   {
     13     path: '',
     14     component: MainComponent,
     15   },
     16   {
     17     path: 'paper/:paperUUID',
     18     component: PaperComponent,
     19   },
     20   {
     21     path: 'papers',
     22     component: PapersComponent,
     23   },
     24   {
     25     path: 'login',
     26     component: LoginComponent,
     27   },
     28   {
     29     path: 'login/twitter/callback',
     30     component: CallbackTwitterComponent,
     31   },
     32   {
     33     path: 'profile/:author',
     34     component: ProfileComponent,
     35   },
     36   {
     37     path: 'profile/:author/settings',
     38     component: SettingsComponent,
     39   },
     40 ];
     41 
     42 @NgModule({
     43   imports: [
     44     RouterModule.forRoot(routes)
     45   ],
     46   exports: [
     47     RouterModule
     48   ],
     49   declarations: []
     50 })
     51 export class AppRoutingModule { }