Skip to content

Commit cf0da13

Browse files
committed
Add shelter info component
1 parent fba3982 commit cf0da13

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

client/src/app/app-routing.module.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { LoginComponent } from './login/login.component';
66
import { SheltersComponent } from './shelters/shelters.component';
77
import { AuthGuard } from './_guards/auth.guard';
88
import { RequestShelterComponent } from './request-shelter/request-shelter.component';
9+
import { ShelterInfoComponent } from './shelters/shelter-info/shelter-info.component';
910

1011
const routes: Routes = [
1112
{
@@ -42,6 +43,18 @@ const routes: Routes = [
4243
}
4344
}
4445
},
46+
{
47+
path: 'shelters/:id',
48+
component: ShelterInfoComponent,
49+
canActivate: [AuthGuard],
50+
data: {
51+
title: 'Shelter Info',
52+
metatags: {
53+
desciption: 'Relief Shelter Information',
54+
keywords: ''
55+
}
56+
}
57+
},
4558
{
4659
path: 'request',
4760
component: RequestShelterComponent,

client/src/app/app.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { environment } from 'src/environments/environment.prod';
1919
import { AddShelterComponent } from './shelters/add-shelter/add-shelter.component';
2020
import { ShelterCardComponent } from './shelters/shelter-card/shelter-card.component';
2121
import { RequestShelterComponent } from './request-shelter/request-shelter.component';
22+
import { ShelterInfoComponent } from './shelters/shelter-info/shelter-info.component';
2223

2324
@NgModule({
2425
declarations: [
@@ -30,7 +31,8 @@ import { RequestShelterComponent } from './request-shelter/request-shelter.compo
3031
SheltersComponent,
3132
AddShelterComponent,
3233
ShelterCardComponent,
33-
RequestShelterComponent
34+
RequestShelterComponent,
35+
ShelterInfoComponent
3436
],
3537
imports: [
3638
BrowserModule,

client/src/app/shelters/shelter-card/shelter-card.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<p class="subtitle">
1414
{{ shelter.contact }}
1515
</p>
16-
<a href="" class="button is-outlined is-info">Click here for more info</a>
16+
<pre>{{shelter | json}}</pre>
17+
<a routerLink="/{{shelter._id}}" class="button is-outlined is-info">Click here for more info</a>
1718
</div>
1819
<div class="column is-4">
1920
<div class="content">

0 commit comments

Comments
 (0)