import { Routes } from '@angular/router';
import { MainPageComponent } from './main-page/main-page.component';
import { AdminPageComponent } from './admin-page/admin-page.component';
import { LoginPageComponent } from './login-page/login-page.component';
import { ViewPageComponent } from './view-page/view-page.component';
import { AddPageComponent } from './add-page/add-page.component';
import { EditPageComponent } from './edit-page/edit-page.component';

export const routes: Routes = [
    { path: '', component: MainPageComponent },
    { path: 'admin', component: AdminPageComponent },
    { path: 'login', component: LoginPageComponent },
    { path: 'view', component: ViewPageComponent },
    { path: 'add', component: AddPageComponent},
    { path: 'edit/:id', component: EditPageComponent},
    { path: '**', redirectTo: '' }
];
