Changeset fa375fe for trip-planner-front/src/app/location
- Timestamp:
- 10/16/21 18:10:51 (3 years ago)
- Branches:
- master
- Children:
- eed0bf8
- Parents:
- 6a3a178
- Location:
- trip-planner-front/src/app/location
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/location/location.component.html
r6a3a178 rfa375fe 5 5 <hr> 6 6 7 <div *ngFor="let city of cities">8 {{city.name}}9 </div>10 <div *ngFor="let country of countries">11 {{country.name}}12 </div>13 14 <hr>15 7 <div *ngFor="let companion of companions"> 16 8 {{companion.type}} -
trip-planner-front/src/app/location/location.component.ts
r6a3a178 rfa375fe 17 17 18 18 categories: Category[]; 19 cities: City[];20 countries:Country[];21 19 companions: Companion[]; 22 constructor(private categoryService: CategoryService, private cityService : CityService, 23 private countryService : CountryService, private companionService : CompanionService) { 20 constructor(private categoryService: CategoryService, private companionService : CompanionService) { 24 21 this.categories = []; 25 this.cities=[];26 this.countries = [];27 22 this.companions = []; 28 23 } … … 35 30 } 36 31 ); 37 this.cityService.getAllCities().subscribe(38 data => {39 this.cities = data;40 41 }42 );43 this.countryService.getAllCountries().subscribe(44 data => {45 this.countries = data;46 }47 );48 32 49 33 this.companionService.getAllCompanions().subscribe(
Note:
See TracChangeset
for help on using the changeset viewer.