Index: trip-planner-front/src/app/locations-form/locations-form.component.ts
===================================================================
--- trip-planner-front/src/app/locations-form/locations-form.component.ts	(revision 6c1585fa4f148668e18010744f1c91faa3165d6b)
+++ trip-planner-front/src/app/locations-form/locations-form.component.ts	(revision ceaed429447854991cde276cd74df8d5dc9a2009)
@@ -1,20 +1,20 @@
-import { Component, Injectable, OnInit } from '@angular/core';
-import { FormControl, NgForm } from '@angular/forms';
-import {map, startWith, switchMap} from 'rxjs/operators';
-import {forkJoin, Observable} from 'rxjs';
+import { Component, EventEmitter, OnInit, Output } from '@angular/core';
+import { FormBuilder, FormControl } from '@angular/forms';
+import { map, startWith, switchMap } from 'rxjs/operators';
+import { Observable } from 'rxjs';
 import { CityService } from '../_services/city.service';
 import { City } from '../_models/city';
-import { Country } from '../_models/country';
-import { CountryService } from '../_services/country.service';
 import { Companion } from '../_models/companion';
 import { CompanionService } from '../_services/companion.service';
 import { Category } from '../_models/category';
 import { CategoryService } from '../_services/cateogry.service';
-import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
 import { MatChip } from '@angular/material/chips';
 import { LocationService } from '../_services/location.service';
 import { Region } from '../_models/region';
 import { RegionService } from '../_services/region.service';
-import { Router } from '@angular/router';
+import { ActivatedRoute, Params, Router } from '@angular/router';
+import { Location } from '../_models/location';
+
+
 
 @Component({
@@ -41,12 +41,14 @@
   cityOption: boolean = false;
   regionOption: boolean = false;
-  value:number;
+  value: number;
   max: number;
   toggle = true;
   status = 'Enable';
+  proba: any[];
 
-  constructor(private cityService : CityService, private regionService: RegionService,
-              private companionService : CompanionService, private categoryService : CategoryService,
-              private locationService: LocationService, private router : Router){
+
+  constructor(private cityService: CityService, private regionService: RegionService,
+    private companionService: CompanionService, private categoryService: CategoryService,
+    private locationService: LocationService, private router: Router, private fb: FormBuilder, private route: ActivatedRoute) {
     this.filteredOptions = new Observable<City[]>();
     this.cities = [];
@@ -63,14 +65,16 @@
     this.value = 0;
     this.max = 30;
+    this.proba = [];
   }
+
+  ngOnInit(): void {
   
-  ngOnInit() :void {
     this.filteredOptions = this.myControl.valueChanges
-    .pipe(
-      startWith(''),
-      switchMap(val => {
-        return this.filter(val || '')
-      })       
-    );
+      .pipe(
+        startWith(''),
+        switchMap(val => {
+          return this.filter(val || '')
+        })
+      );
 
     this.cityService.getAllCities().subscribe(
@@ -96,7 +100,8 @@
         this.companions = data;
       }
-    )
+    );
+
   }
-  
+
   filter(val: string): Observable<City[]> {
     // call the service which makes the http-request
@@ -107,22 +112,22 @@
         }))
       )
-
   }
 
- toggleSelection(chip: MatChip, category: Category){
-  chip.toggleSelected();
-  
-   if (this.chipsSeletion.length > 0) {
-     if (this.chipsSeletion.indexOf(category.id) <= -1) {
-       this.chipsSeletion.push(category.id);
-     } else {
-       const index = this.chipsSeletion.indexOf(category.id);
-       this.chipsSeletion.splice(index, 1);
-     }
-   } else {
-     this.chipsSeletion.push(category.id);
-   }
-   console.log(this.chipsSeletion);
- }
+  toggleSelection(chip: MatChip, category: Category) {
+    chip.toggleSelected();
+
+    if (this.chipsSeletion.length > 0) {
+      if (this.chipsSeletion.indexOf(category.id) <= -1) {
+        this.chipsSeletion.push(category.id);
+      } else {
+        const index = this.chipsSeletion.indexOf(category.id);
+        this.chipsSeletion.splice(index, 1);
+      }
+    } else {
+      this.chipsSeletion.push(category.id);
+    }
+    console.log(this.chipsSeletion);
+  }
+
 
 
@@ -135,18 +140,17 @@
         result => {
           console.log(result);
-          this.router.navigate(['locations']);
+          this.proba = result;
+          this.router.navigate(['locations'], {queryParams: {cityId: this.cityId, companionId: this.companionId, lengthOfStay: this.lengthOfStay, categoryIds: this.categoryIds}});
         }
       );
-    } else if (this.regionOption) {
-      this.locationService.getLocationsFromRegion(this.regionId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe(
-        result => {
-          console.log(result);
-          this.router.navigate(['locations']);
-        }
-      );
-    }
-
-
-
+    } else
+      if (this.regionOption) {
+        this.locationService.getLocationsFromRegion(this.regionId, this.companionId, this.lengthOfStay, this.categoryIds).subscribe(
+          result => {
+            console.log(result);
+            this.router.navigate(['locations'], {queryParams: {regionId: this.regionId, companionId: this.companionId, lengthOfStay: this.lengthOfStay, categoryIds: this.categoryIds}});
+          }
+        );
+      }
   }
 
@@ -166,3 +170,4 @@
   }
 
+
 }
