Ignore:
Timestamp:
11/02/21 22:14:57 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
6c1585f
Parents:
188ee53
Message:

create initial planner and routing with angular

Location:
trip-planner-front/src/app/locations-form
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/locations-form/locations-form.component.css

    r188ee53 r6a80231  
    1919}
    2020
    21 .colorClass{
    22   color:yellow;
     21.yellow{
     22  background-color:yellow;
    2323}
  • trip-planner-front/src/app/locations-form/locations-form.component.html

    r188ee53 r6a80231  
    6767
    6868   <h5>What are your priorities to visit?</h5>
    69   <mat-chip-list  selectable multiple>
     69  <mat-chip-list  selectable multiple >
    7070    <mat-chip #c="matChip" selected *ngFor="let category of categories"
    71     (click)="toggleSelection(c, category)">
     71    (click)="toggleSelection(c, category)" [ngClass]="{'yellow' : toggle}">
    7272  <mat-icon *ngIf="!c.selected" >check</mat-icon>
    7373  {{category.name}}
  • trip-planner-front/src/app/locations-form/locations-form.component.ts

    r188ee53 r6a80231  
    11import { Component, Injectable, OnInit } from '@angular/core';
    2 import { FormControl } from '@angular/forms';
     2import { FormControl, NgForm } from '@angular/forms';
    33import {map, startWith, switchMap} from 'rxjs/operators';
    44import {forkJoin, Observable} from 'rxjs';
     
    4242  value:number;
    4343  max: number;
     44  toggle = true;
     45  status = 'Enable';
    4446
    4547  constructor(private cityService : CityService, private regionService: RegionService,
     
    109111 toggleSelection(chip: MatChip, category: Category){
    110112  chip.toggleSelected();
     113 
    111114  if(this.chipsSeletion.length > 0){
    112115    if(this.chipsSeletion.indexOf(category.id) <= -1){
     
    141144    );
    142145   }
    143    
    144  
    145146 }
     147 
    146148 chooseCityOption(){
    147149   this.cityOption = true;
     
    158160     }
    159161  }
     162
    160163}
Note: See TracChangeset for help on using the changeset viewer.