You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
angular_minigame/src/app/app.routes.ts

20 lines
1.1 KiB

import { Routes } from '@angular/router';
import { BookListComponent } from './components/book-list/book-list.component';
import { BookFormComponent } from './components/book-form/book-form.component';
import { BookDetailComponent } from './components/book-detail/book-detail.component';
import { LoginComponent } from './components/login/login.component';
import { UserListComponent } from './components/user-list/user-list.component';
import { UserDetailComponent } from './components/user-detail/user-detail.component';
import { SudokuComponent } from './components/sudoku/sudoku.component';
export const routes: Routes = [
{ path: '', component: LoginComponent },
{ path: 'books', component: BookListComponent },
{ path: 'book/add', component: BookFormComponent },
{ path: 'book/:id', component: BookDetailComponent },
{ path: 'users', component: UserListComponent },
{ path: 'user/:id', component: UserDetailComponent },
{ path: 'sudoku/:difficulty', component: SudokuComponent },
{ path: '**', redirectTo: '', pathMatch: 'full' }
];