source: trip-planner-front/src/app/location/add-location-to-planner-panel/add-location-to-planner-panel.component.ts

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

signup/login server errors on front and remove location from planner

  • Property mode set to 100644
File size: 853 bytes
Line 
1import { Component, OnInit } from '@angular/core';
2import { Planner } from 'src/app/_models/planner';
3import { PlannerService } from 'src/app/_services/planner.service';
4import { DynamicDialogRef } from 'primeng/dynamicdialog';
5
6
7
8@Component({
9 selector: 'app-add-location-to-planner-panel',
10 templateUrl: './add-location-to-planner-panel.component.html',
11 styleUrls: ['./add-location-to-planner-panel.component.css']
12})
13export class AddLocationToPlannerPanelComponent implements OnInit {
14
15 planners: Planner[];
16
17 constructor(private plannerService: PlannerService, private ref: DynamicDialogRef) {
18 this.planners = [];
19 }
20
21 ngOnInit(): void {
22
23 this.plannerService.getAllPlanners().subscribe(
24 planner => {
25 this.planners = planner;
26 }
27 );
28 }
29
30 selectPlanner(planner: Planner) {
31 this.ref.close(planner);
32 }
33
34}
Note: See TracBrowser for help on using the repository browser.