Last change
on this file since 8d391a1 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago |
adding photos
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | import { Component, OnInit } from '@angular/core';
|
---|
2 | import { Location } from '../_models/location';
|
---|
3 | import { LocationService } from '../_services/location.service';
|
---|
4 |
|
---|
5 |
|
---|
6 | @Component({
|
---|
7 | selector: 'app-homepage',
|
---|
8 | templateUrl: './homepage.component.html',
|
---|
9 | styleUrls: ['./homepage.component.css']
|
---|
10 | })
|
---|
11 | export class HomepageComponent implements OnInit {
|
---|
12 |
|
---|
13 | imageURI = 'https://i.pinimg.com/736x/a1/1a/57/a11a572a1ec4e07039bbd04661a3b035.jpg';
|
---|
14 | myLogo = 'http://www.logo-designer.co/wp-content/uploads/2020/02/2020-tripadvisor-new-logo-design-by-mother-design-4.png';
|
---|
15 | responsiveOptions;
|
---|
16 | locations: Location[];
|
---|
17 | villages: Location[];
|
---|
18 |
|
---|
19 | constructor(private locationService: LocationService) {
|
---|
20 | this.responsiveOptions = [
|
---|
21 | {
|
---|
22 | breakpoint: '1024px',
|
---|
23 | numVisible: 3,
|
---|
24 | numScroll: 3
|
---|
25 | },
|
---|
26 | {
|
---|
27 | breakpoint: '768px',
|
---|
28 | numVisible: 2,
|
---|
29 | numScroll: 2
|
---|
30 | },
|
---|
31 | {
|
---|
32 | breakpoint: '560px',
|
---|
33 | numVisible: 1,
|
---|
34 | numScroll: 1
|
---|
35 | }
|
---|
36 | ];
|
---|
37 | this.locations = [];
|
---|
38 | this.villages = [];
|
---|
39 | }
|
---|
40 |
|
---|
41 | ngOnInit(): void {
|
---|
42 |
|
---|
43 | this.locationService.getWeekendGetaways().subscribe(
|
---|
44 | data => {
|
---|
45 | this.locations = data;
|
---|
46 | });
|
---|
47 |
|
---|
48 | this.locationService.getVillages().subscribe(
|
---|
49 | village => {
|
---|
50 | this.villages = village;
|
---|
51 | }
|
---|
52 | );
|
---|
53 | }
|
---|
54 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.