- Timestamp:
- 11/23/21 14:58:44 (3 years ago)
- Branches:
- master
- Children:
- e29cc2e
- Parents:
- ceaed42
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/src/app/location/location.component.ts
rceaed42 r59329aa 1 import { Route } from '@angular/compiler/src/core';2 1 import { Component, Input, OnInit, Output } from '@angular/core'; 3 2 import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 4 3 import { MatDialog } from '@angular/material/dialog'; 5 4 import { ActivatedRoute, Router } from '@angular/router'; 6 import { Location } from '../_models/location';7 5 import { LocationService } from '../_services/location.service'; 8 6 import { AddLocationToPlannerPanelComponent } from './add-location-to-planner-panel/add-location-to-planner-panel.component'; … … 24 22 regionOption: boolean = false; 25 23 regionId: number; 24 locationId: number; 26 25 27 26 constructor(private fb: FormBuilder, private route: ActivatedRoute, private locationService: LocationService, … … 36 35 this.listLocations = []; 37 36 this.regionId = 1; 37 this.locationId = 1; 38 38 } 39 39 … … 71 71 } 72 72 73 openDialogSave(locationId : number){74 console.log(locationId);73 openDialogSave(locationId){ 74 // console.log(locationId); 75 75 const dialogRef = this.dialog.open(AddLocationToPlannerPanelComponent, { 76 76 width: '250px', 77 77 data: {} 78 78 }); 79 this.router.navigate(['locations'], {queryParams: {locationId: locationId}}); 79 this.router.navigate(['locations'], {queryParams: {regionId: this.regionId, companionId: this.companionId, lengthOfStay: this.lengthOfStay, categoryIds: this.categoryIds, locationId: locationId}}); 80 80 81 } 81 82 83 onClickSeeDetails(id: number){ 84 this.router.navigate(['location'], {queryParams: {id: id}}); 85 } 82 86 }
Note:
See TracChangeset
for help on using the changeset viewer.