Ignore:
Timestamp:
10/16/21 18:10:51 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
eed0bf8
Parents:
6a3a178
Message:

adding new components

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  
    55  <hr>
    66
    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>
    157  <div *ngFor="let companion of companions">
    168    {{companion.type}}
  • trip-planner-front/src/app/location/location.component.ts

    r6a3a178 rfa375fe  
    1717
    1818  categories: Category[];
    19   cities: City[];
    20   countries:Country[];
    2119  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) {
    2421    this.categories = [];
    25     this.cities=[];
    26     this.countries = [];
    2722    this.companions = [];
    2823   }
     
    3530      }
    3631    );
    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     );
    4832
    4933    this.companionService.getAllCompanions().subscribe(
Note: See TracChangeset for help on using the changeset viewer.