Changeset 6a80231 for trip-planner-front/src/app/locations-form
- Timestamp:
- 11/02/21 22:14:57 (3 years ago)
- Branches:
- master
- Children:
- 6c1585f
- Parents:
- 188ee53
- 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 19 19 } 20 20 21 . colorClass{22 color:yellow;21 .yellow{ 22 background-color:yellow; 23 23 } -
trip-planner-front/src/app/locations-form/locations-form.component.html
r188ee53 r6a80231 67 67 68 68 <h5>What are your priorities to visit?</h5> 69 <mat-chip-list selectable multiple >69 <mat-chip-list selectable multiple > 70 70 <mat-chip #c="matChip" selected *ngFor="let category of categories" 71 (click)="toggleSelection(c, category)" >71 (click)="toggleSelection(c, category)" [ngClass]="{'yellow' : toggle}"> 72 72 <mat-icon *ngIf="!c.selected" >check</mat-icon> 73 73 {{category.name}} -
trip-planner-front/src/app/locations-form/locations-form.component.ts
r188ee53 r6a80231 1 1 import { Component, Injectable, OnInit } from '@angular/core'; 2 import { FormControl } from '@angular/forms';2 import { FormControl, NgForm } from '@angular/forms'; 3 3 import {map, startWith, switchMap} from 'rxjs/operators'; 4 4 import {forkJoin, Observable} from 'rxjs'; … … 42 42 value:number; 43 43 max: number; 44 toggle = true; 45 status = 'Enable'; 44 46 45 47 constructor(private cityService : CityService, private regionService: RegionService, … … 109 111 toggleSelection(chip: MatChip, category: Category){ 110 112 chip.toggleSelected(); 113 111 114 if(this.chipsSeletion.length > 0){ 112 115 if(this.chipsSeletion.indexOf(category.id) <= -1){ … … 141 144 ); 142 145 } 143 144 145 146 } 147 146 148 chooseCityOption(){ 147 149 this.cityOption = true; … … 158 160 } 159 161 } 162 160 163 }
Note:
See TracChangeset
for help on using the changeset viewer.