Ignore:
Timestamp:
11/04/21 23:10:39 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
ceaed42
Parents:
6a80231
Message:

edit planner form with angular

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/location/location.component.ts

    r6a80231 r6c1585f  
    1616export class LocationComponent implements OnInit {
    1717
    18   categories: Category[];
    19   companions: Companion[];
    20   constructor(private categoryService: CategoryService, private companionService : CompanionService) {
    21     this.categories = [];
    22     this.companions = [];
     18  constructor() {
     19   
    2320   }
    2421   
    2522  ngOnInit(): void {
    26     this.categoryService.getAllCategories().subscribe(
    27       data => {
    28         this.categories = data;
    29         console.log(data);
    30       }
    31     );
    32 
    33     this.companionService.getAllCompanions().subscribe(
    34       data => {
    35         this.companions = data;
    36       }
    37     );
     23   
    3824  }
    3925}
Note: See TracChangeset for help on using the changeset viewer.