source: trip-planner-front/src/app/planner/planner.component.ts@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 589 bytes
Line 
1import { Component, OnInit } from '@angular/core';
2import { Planner } from '../_models/planner';
3import { PlannerService } from '../_services/planner.service';
4
5@Component({
6 selector: 'app-planner',
7 templateUrl: './planner.component.html',
8 styleUrls: ['./planner.component.css']
9})
10export class PlannerComponent implements OnInit {
11
12 planners: Planner[];
13 constructor(private plannerService: PlannerService) {
14 this.planners = [];
15 }
16
17 ngOnInit(): void {
18 this.plannerService.getAllPlanners().subscribe(
19 data => {
20 this.planners = data;
21 }
22 );
23 }
24
25}
Note: See TracBrowser for help on using the repository browser.