1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-14 11:23:17 +02:00
pigallery2/frontend/app/app.routing.ts
2018-03-30 15:30:30 -04:00

43 lines
1.0 KiB
TypeScript

import {ModuleWithProviders} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {LoginComponent} from './login/login.component';
import {GalleryComponent} from './gallery/gallery.component';
import {AdminComponent} from './admin/admin.component';
import {ShareLoginComponent} from './sharelogin/share-login.component';
const ROUTES: Routes = [
{
path: 'login',
component: LoginComponent
},
{
path: 'shareLogin',
component: ShareLoginComponent
},
{
path: 'admin',
component: AdminComponent
},
{
path: 'gallery/:directory',
component: GalleryComponent
},
{
path: 'gallery',
component: GalleryComponent
},
{
path: 'search/:searchText',
component: GalleryComponent
},
{
path: 'share/:sharingKey',
component: GalleryComponent
},
{path: '', redirectTo: '/login', pathMatch: 'full'},
{path: '**', redirectTo: '/login', pathMatch: 'full'}
];
export const appRoutes: ModuleWithProviders = RouterModule.forRoot(ROUTES);