- Timestamp:
- 11/04/21 23:10:39 (3 years ago)
- Branches:
- master
- Children:
- ceaed42
- Parents:
- 6a80231
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/location/location.component.ts
r6a80231 r6c1585f 16 16 export class LocationComponent implements OnInit { 17 17 18 categories: Category[]; 19 companions: Companion[]; 20 constructor(private categoryService: CategoryService, private companionService : CompanionService) { 21 this.categories = []; 22 this.companions = []; 18 constructor() { 19 23 20 } 24 21 25 22 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 38 24 } 39 25 }
Note:
See TracChangeset
for help on using the changeset viewer.