diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 8204efc..2a2797f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -29,7 +29,16 @@ import {LocationCreateComponent} from "./location/location-create/location-creat import {ScheduleListComponent} from "./schedule/schedule-list/schedule-list.component"; import {ScheduleCreateComponent} from "./schedule/schedule-create/schedule-create.component"; import {ScheduleDetailComponent} from "./schedule/schedule-detail/schedule-detail.component"; - +import { CatListComponent } from './pet/cat/cat-list/cat-list.component'; +import { CatCreateComponent } from './pet/cat/cat-create/cat-create.component'; +import { CatDetailComponent } from './pet/cat/cat-detail/cat-detail.component'; +import { CatEditComponent } from './pet/cat/cat-edit/cat-edit.component'; +import { CatDeleteComponent } from './pet/cat/cat-delete/cat-delete.component'; +import { DogListComponent } from './pet/dog/dog-list/dog-list.component'; +import { DogCreateComponent } from './pet/dog/dog-create/dog-create.component'; +import { DogDetailComponent } from './pet/dog/dog-detail/dog-detail.component'; +import { DogEditComponent } from './pet/dog/dog-edit/dog-edit.component'; +import { DogDeleteComponent } from './pet/dog/dog-delete/dog-delete.component'; const routes: Routes = [ { path: 'users/create', component: UserRegisterComponent}, @@ -58,6 +67,16 @@ const routes: Routes = [ { path: 'role/create', component:RoleCreateComponent }, { path: 'role/:id/delete', component:RoleDeleteComponent }, { path: 'role/:id', component:RoleDetailComponent }, + { path: 'cats', component: CatListComponent, canActivate: [LoggedInGuard]}, + { path: 'cats/create', component: CatCreateComponent, canActivate: [LoggedInGuard]}, + { path: 'cats/:id', component: CatDetailComponent, canActivate: [LoggedInGuard]}, + { path: 'cats/:id/edit', component: CatEditComponent, canActivate: [LoggedInGuard]}, + { path: 'cats/:id/delete', component: CatDeleteComponent, canActivate: [LoggedInGuard]}, + { path: 'dogs', component: DogListComponent, canActivate: [LoggedInGuard]}, + { path: 'dogs/create', component: DogCreateComponent, canActivate: [LoggedInGuard]}, + { path: 'dogs/:id', component: DogDetailComponent, canActivate: [LoggedInGuard]}, + { path: 'dogs/:id/edit', component: DogEditComponent, canActivate: [LoggedInGuard]}, + { path: 'dogs/:id/delete', component: DogDeleteComponent, canActivate: [LoggedInGuard]}, { path: 'about', component: AboutComponent}, { path: '404', component: NotFoundComponent}, { path: '', redirectTo: 'about', pathMatch: 'full'}, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ff31e7d..e70a2af 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -51,7 +51,20 @@ import {ScheduleListComponent} from './schedule/schedule-list/schedule-list.comp import {ScheduleSearchComponent} from './schedule/schedule-search/schedule-search.component'; import {ScheduleCreateComponent} from "./schedule/schedule-create/schedule-create.component"; import {ScheduleDetailComponent} from "./schedule/schedule-detail/schedule-detail.component"; - +import { CatListComponent } from './pet/cat/cat-list/cat-list.component'; +import { CatService } from './pet/cat/cat.service'; +import { DogService } from './pet/dog/dog.service'; +import { CatCreateComponent } from './pet/cat/cat-create/cat-create.component'; +import { CatDetailComponent } from './pet/cat/cat-detail/cat-detail.component'; +import { CatEditComponent } from './pet/cat/cat-edit/cat-edit.component'; +import { CatDeleteComponent } from './pet/cat/cat-delete/cat-delete.component'; +import { CatSearchComponent } from './pet/cat/cat-search/cat-search.component'; +import { DogListComponent } from './pet/dog/dog-list/dog-list.component'; +import { DogCreateComponent } from './pet/dog/dog-create/dog-create.component'; +import { DogDetailComponent } from './pet/dog/dog-detail/dog-detail.component'; +import { DogDeleteComponent } from './pet/dog/dog-delete/dog-delete.component'; +import { DogEditComponent } from './pet/dog/dog-edit/dog-edit.component'; +import { DogSearchComponent } from './pet/dog/dog-search/dog-search.component'; @NgModule({ declarations: [ @@ -88,7 +101,19 @@ import {ScheduleDetailComponent} from "./schedule/schedule-detail/schedule-detai ShelterDetailComponent, LocationListComponent, LocationSearchComponent, - LocationCreateComponent + LocationCreateComponent, + CatListComponent, + CatCreateComponent, + CatDetailComponent, + CatDeleteComponent, + CatEditComponent, + CatSearchComponent, + DogListComponent, + DogCreateComponent, + DogDetailComponent, + DogDeleteComponent, + DogEditComponent, + DogSearchComponent, ], imports: [ BrowserModule, @@ -108,7 +133,7 @@ import {ScheduleDetailComponent} from "./schedule/schedule-detail/schedule-detai { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }, AuthenticationBasicService, LoggedInGuard, UserService, ScheduleService, ShelterService, LocationService, - provideAnimationsAsync() + CatService, DogService, provideAnimationsAsync() ], bootstrap: [AppComponent] }) diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index f50626a..d891f16 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -1,5 +1,5 @@