Skip to content

Commit

Permalink
Add routes and components to app
Browse files Browse the repository at this point in the history
  • Loading branch information
PauMAVA committed May 18, 2024
1 parent d7c930f commit 3b4a408
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { UserEditComponent } from './user/user-edit/user-edit.component';
import { UserDeleteComponent } from './user/user-delete/user-delete.component';
import { ShelterListComponent } from './shelter/shelter-list/shelter-list.component'
import {ShelterCreateComponent} from "./shelter/shelter-create/shelter-create.component";
import { CatListComponent } from './pet/cat/cat-list/cat-list.component';
import { DogListComponent } from './pet/dog/dog-list/dog-list.component';

const routes: Routes = [
{ path: 'users/create', component: UserRegisterComponent},
Expand All @@ -22,6 +24,8 @@ const routes: Routes = [
{ path: '', redirectTo: 'about', pathMatch: 'full'},
{ path: 'shelters', component: ShelterListComponent},
{ path: 'shelters/create', component: ShelterCreateComponent},
{ path: 'cats', component: CatListComponent},
{ path: 'dogs', component: DogListComponent},
];

@NgModule({
Expand Down
12 changes: 9 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import {ShelterService} from "./shelter/shelter.service";
import {ShelterListComponent} from "./shelter/shelter-list/shelter-list.component";
import {ShelterCreateComponent} from "./shelter/shelter-create/shelter-create.component";
import {ShelterDetailComponent} from "./shelter/shelter-detail/shelter-detail.component";
import { CatListComponent } from './pet/cat/cat-list/cat-list.component';
import { DogListComponent } from './pet/dog/dog-list/dog-list.component';
import { CatService } from './pet/cat/cat.service';
import { DogService } from './pet/dog/dog.service';

@NgModule({
declarations: [
Expand All @@ -43,7 +47,9 @@ import {ShelterDetailComponent} from "./shelter/shelter-detail/shelter-detail.co
UserSearchComponent,
ShelterListComponent,
ShelterCreateComponent,
ShelterDetailComponent
ShelterDetailComponent,
CatListComponent,
DogListComponent,
],
imports: [
BrowserModule,
Expand All @@ -57,12 +63,12 @@ import {ShelterDetailComponent} from "./shelter/shelter-detail/shelter-detail.co
LoginBasicModule,
ErrorHandlerModule,
NgbModule,
ReactiveFormsModule
ReactiveFormsModule,
],
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true },
AuthenticationBasicService, LoggedInGuard, UserService, ShelterService, provideAnimationsAsync()
AuthenticationBasicService, LoggedInGuard, UserService, ShelterService, CatService, DogService, provideAnimationsAsync()
],
bootstrap: [AppComponent]
})
Expand Down

0 comments on commit 3b4a408

Please sign in to comment.