import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import Parse from "parse";

@Component({
  selector: 'app-resort',
  templateUrl: './resort.page.html',
  styleUrls: ['./resort.page.scss'],
})
export class ResortPage implements OnInit {

  constructor(private route:ActivatedRoute) { }

  ngOnInit() {
    this.loadItemsById()
  }

  items:Parse.Object|undefined
  async loadItemsById() {
    let id = this.route.snapshot.params["id"]

    if(id){
      let query = new Parse.Query("Items");
      this.items = await query.get(id);
    }
  }

}
