|
@@ -0,0 +1,29 @@
|
|
|
+import { Component, OnInit } from '@angular/core';
|
|
|
+import { ActivatedRoute } from '@angular/router';
|
|
|
+import Parse from "parse";
|
|
|
+
|
|
|
+@Component({
|
|
|
+ selector: 'app-place-detail',
|
|
|
+ templateUrl: './place-detail.page.html',
|
|
|
+ styleUrls: ['./place-detail.page.scss'],
|
|
|
+})
|
|
|
+export class PlaceDetailPage implements OnInit {
|
|
|
+
|
|
|
+ constructor(private route:ActivatedRoute) { }
|
|
|
+
|
|
|
+ ngOnInit() {
|
|
|
+ this.loadPlaceById()
|
|
|
+ }
|
|
|
+
|
|
|
+ place:Parse.Object|undefined
|
|
|
+ async loadPlaceById(){
|
|
|
+ let id = this.route.snapshot.params["id"]
|
|
|
+
|
|
|
+ if(id){
|
|
|
+ let query = new Parse.Query("YJPlaces");
|
|
|
+ this.place = await query.get(id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|