Ignore:
Timestamp:
11/25/21 22:08:24 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
8d391a1
Parents:
59329aa
Message:

primeNG components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/location/location-details/location-details.component.ts

    r59329aa re29cc2e  
    1 import { Component, OnInit , ViewEncapsulation} from '@angular/core';
     1import { Component, OnInit, ViewEncapsulation } from '@angular/core';
    22import { ActivatedRoute, Router } from '@angular/router';
    33import { Images } from 'src/app/_models/images';
     
    1616  locationDetails: Location;
    1717  images: Images[];
    18   responsiveOptions;
    1918
    20   constructor(private route: ActivatedRoute, private router: Router, private locationService : LocationService,
    21               private imagesService : ImagesService) {
     19  constructor(private route: ActivatedRoute, private router: Router, private locationService: LocationService,
     20    private imagesService: ImagesService) {
    2221    this.locationId = 1;
    2322    this.locationDetails = new Location();
    2423    this.images = [];
     24  }
    2525
    26     this.responsiveOptions = [
    27       {
     26  responsiveOptions:any[] = [
     27    {
    2828        breakpoint: '1024px',
    2929        numVisible: 5
     
    3737        numVisible: 1
    3838    }
    39   ];
    40    }
    41 
    42 
     39];
    4340  ngOnInit(): void {
    4441    this.route.queryParams
    45     .subscribe(params => {     
    46       this.locationId = params.id;
    47     });
     42      .subscribe(params => {
     43        this.locationId = params.id;
     44      });
    4845
    4946    this.locationService.getLocation(this.locationId).subscribe(
    5047      data => {
    51           this.locationDetails = data;
     48        this.locationDetails = data;
    5249      }
    5350    );
    54    
     51
    5552    this.imagesService.getAllImagesForLocation(this.locationId).subscribe(
    5653      image => {
    57          this.images = image;
     54        this.images = image;
    5855      }
    59    );
     56    );
    6057  }
    6158
    62  
     59
    6360}
Note: See TracChangeset for help on using the changeset viewer.