File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { LoginComponent } from './login/login.component';
66import { SheltersComponent } from './shelters/shelters.component' ;
77import { AuthGuard } from './_guards/auth.guard' ;
88import { RequestShelterComponent } from './request-shelter/request-shelter.component' ;
9+ import { ShelterInfoComponent } from './shelters/shelter-info/shelter-info.component' ;
910
1011const 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 ,
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { environment } from 'src/environments/environment.prod';
1919import { AddShelterComponent } from './shelters/add-shelter/add-shelter.component' ;
2020import { ShelterCardComponent } from './shelters/shelter-card/shelter-card.component' ;
2121import { 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 ,
Original file line number Diff line number Diff line change 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 ">
You can’t perform that action at this time.
0 commit comments