|
@@ -1,6 +1,6 @@
|
1
|
1
|
webpackJsonp([6],{
|
2
|
2
|
|
3
|
|
-/***/ 151:
|
|
3
|
+/***/ 152:
|
4
|
4
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5
|
5
|
|
6
|
6
|
"use strict";
|
|
@@ -31,8 +31,8 @@ var AddDestinationPage = /** @class */ (function () {
|
31
|
31
|
this.formBuilder = formBuilder;
|
32
|
32
|
this.destinationService = destinationService;
|
33
|
33
|
this.profile = {
|
34
|
|
- id: 1,
|
35
|
|
- userName: "JohnDoe",
|
|
34
|
+ id: 3,
|
|
35
|
+ userName: "johnDoe",
|
36
|
36
|
homeCity: "",
|
37
|
37
|
homeCountry: "",
|
38
|
38
|
description: "",
|
|
@@ -72,7 +72,7 @@ var AddDestinationPage = /** @class */ (function () {
|
72
|
72
|
|
73
|
73
|
/***/ }),
|
74
|
74
|
|
75
|
|
-/***/ 152:
|
|
75
|
+/***/ 153:
|
76
|
76
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
77
|
77
|
|
78
|
78
|
"use strict";
|
|
@@ -107,7 +107,7 @@ var DestinationDetailsPage = /** @class */ (function () {
|
107
|
107
|
};
|
108
|
108
|
DestinationDetailsPage = __decorate([
|
109
|
109
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
|
110
|
|
- selector: 'page-destination-details',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/destination-details/destination-details.html"*/'<!--\n Generated template for the DestinationDetailsPage page.\n\n See http://ionicframework.com/docs/components/#navigation for more info on\n Ionic pages and navigation.\n-->\n<ion-header>\n\n <ion-navbar>\n <ion-title>{{ destination.city }}, {{ destination.country }}</ion-title>\n </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/destination-details/destination-details.html"*/,
|
|
110
|
+ selector: 'page-destination-details',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/destination-details/destination-details.html"*/'<ion-header>\n\n <ion-navbar>\n <ion-title>{{ destination.city }}, {{ destination.country }}</ion-title>\n </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/destination-details/destination-details.html"*/,
|
111
|
111
|
}),
|
112
|
112
|
__metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
|
113
|
113
|
], DestinationDetailsPage);
|
|
@@ -118,15 +118,15 @@ var DestinationDetailsPage = /** @class */ (function () {
|
118
|
118
|
|
119
|
119
|
/***/ }),
|
120
|
120
|
|
121
|
|
-/***/ 153:
|
|
121
|
+/***/ 154:
|
122
|
122
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
123
|
123
|
|
124
|
124
|
"use strict";
|
125
|
125
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginPage; });
|
126
|
126
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
127
|
127
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
|
128
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile_profile__ = __webpack_require__(154);
|
129
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__signup_signup__ = __webpack_require__(155);
|
|
128
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile_profile__ = __webpack_require__(155);
|
|
129
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__signup_signup__ = __webpack_require__(156);
|
130
|
130
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
131
|
131
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
132
|
132
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -167,7 +167,7 @@ var LoginPage = /** @class */ (function () {
|
167
|
167
|
|
168
|
168
|
/***/ }),
|
169
|
169
|
|
170
|
|
-/***/ 154:
|
|
170
|
+/***/ 155:
|
171
|
171
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
172
|
172
|
|
173
|
173
|
"use strict";
|
|
@@ -217,14 +217,14 @@ var ProfilePage = /** @class */ (function () {
|
217
|
217
|
|
218
|
218
|
/***/ }),
|
219
|
219
|
|
220
|
|
-/***/ 155:
|
|
220
|
+/***/ 156:
|
221
|
221
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
222
|
222
|
|
223
|
223
|
"use strict";
|
224
|
224
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SignupPage; });
|
225
|
225
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
226
|
226
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
|
227
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_user_service_signup_service__ = __webpack_require__(156);
|
|
227
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__services_user_service_signup_service__ = __webpack_require__(157);
|
228
|
228
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_forms__ = __webpack_require__(21);
|
229
|
229
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map_map__ = __webpack_require__(62);
|
230
|
230
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -282,14 +282,14 @@ var SignupPage = /** @class */ (function () {
|
282
|
282
|
|
283
|
283
|
/***/ }),
|
284
|
284
|
|
285
|
|
-/***/ 156:
|
|
285
|
+/***/ 157:
|
286
|
286
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
287
|
287
|
|
288
|
288
|
"use strict";
|
289
|
289
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SignupService; });
|
290
|
290
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
291
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__(310);
|
292
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs__ = __webpack_require__(213);
|
|
291
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common_http__ = __webpack_require__(115);
|
|
292
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs__ = __webpack_require__(215);
|
293
|
293
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_rxjs__);
|
294
|
294
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
295
|
295
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -308,7 +308,6 @@ var SignupService = /** @class */ (function () {
|
308
|
308
|
this.httpClient = httpClient;
|
309
|
309
|
this.userUrl = "http://localhost:9090/api/v1/users";
|
310
|
310
|
}
|
311
|
|
- //CREATE
|
312
|
311
|
SignupService.prototype.createUser = function (user) {
|
313
|
312
|
return this.httpClient
|
314
|
313
|
.post(this.userUrl, user)
|
|
@@ -328,7 +327,7 @@ var SignupService = /** @class */ (function () {
|
328
|
327
|
|
329
|
328
|
/***/ }),
|
330
|
329
|
|
331
|
|
-/***/ 167:
|
|
330
|
+/***/ 168:
|
332
|
331
|
/***/ (function(module, exports) {
|
333
|
332
|
|
334
|
333
|
function webpackEmptyAsyncContext(req) {
|
|
@@ -341,11 +340,11 @@ function webpackEmptyAsyncContext(req) {
|
341
|
340
|
webpackEmptyAsyncContext.keys = function() { return []; };
|
342
|
341
|
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
|
343
|
342
|
module.exports = webpackEmptyAsyncContext;
|
344
|
|
-webpackEmptyAsyncContext.id = 167;
|
|
343
|
+webpackEmptyAsyncContext.id = 168;
|
345
|
344
|
|
346
|
345
|
/***/ }),
|
347
|
346
|
|
348
|
|
-/***/ 211:
|
|
347
|
+/***/ 212:
|
349
|
348
|
/***/ (function(module, exports, __webpack_require__) {
|
350
|
349
|
|
351
|
350
|
var map = {
|
|
@@ -385,19 +384,19 @@ function webpackAsyncContext(req) {
|
385
|
384
|
webpackAsyncContext.keys = function webpackAsyncContextKeys() {
|
386
|
385
|
return Object.keys(map);
|
387
|
386
|
};
|
388
|
|
-webpackAsyncContext.id = 211;
|
|
387
|
+webpackAsyncContext.id = 212;
|
389
|
388
|
module.exports = webpackAsyncContext;
|
390
|
389
|
|
391
|
390
|
/***/ }),
|
392
|
391
|
|
393
|
|
-/***/ 354:
|
|
392
|
+/***/ 353:
|
394
|
393
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
395
|
394
|
|
396
|
395
|
"use strict";
|
397
|
396
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HomePage; });
|
398
|
397
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
399
|
398
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
|
400
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login_login__ = __webpack_require__(153);
|
|
399
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login_login__ = __webpack_require__(154);
|
401
|
400
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
402
|
401
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
403
|
402
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -430,13 +429,13 @@ var HomePage = /** @class */ (function () {
|
430
|
429
|
|
431
|
430
|
/***/ }),
|
432
|
431
|
|
433
|
|
-/***/ 355:
|
|
432
|
+/***/ 354:
|
434
|
433
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
435
|
434
|
|
436
|
435
|
"use strict";
|
437
|
436
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
438
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(356);
|
439
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(360);
|
|
437
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(355);
|
|
438
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(359);
|
440
|
439
|
|
441
|
440
|
|
442
|
441
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_1__app_module__["a" /* AppModule */]);
|
|
@@ -444,7 +443,7 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
|
444
|
443
|
|
445
|
444
|
/***/ }),
|
446
|
445
|
|
447
|
|
-/***/ 360:
|
|
446
|
+/***/ 359:
|
448
|
447
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
449
|
448
|
|
450
|
449
|
"use strict";
|
|
@@ -452,20 +451,20 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
|
452
|
451
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(40);
|
453
|
452
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
|
454
|
453
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(29);
|
455
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(350);
|
456
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__ = __webpack_require__(353);
|
457
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_http__ = __webpack_require__(212);
|
|
454
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(349);
|
|
455
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__ = __webpack_require__(352);
|
|
456
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_http__ = __webpack_require__(679);
|
458
|
457
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__app_component__ = __webpack_require__(680);
|
459
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__pages_home_home__ = __webpack_require__(354);
|
460
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pages_login_login__ = __webpack_require__(153);
|
461
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__ = __webpack_require__(155);
|
462
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__ = __webpack_require__(154);
|
|
458
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__pages_home_home__ = __webpack_require__(353);
|
|
459
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pages_login_login__ = __webpack_require__(154);
|
|
460
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__ = __webpack_require__(156);
|
|
461
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__ = __webpack_require__(155);
|
463
|
462
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pages_map_map__ = __webpack_require__(62);
|
464
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__ = __webpack_require__(152);
|
465
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__pages_add_destination_add_destination__ = __webpack_require__(151);
|
|
463
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__ = __webpack_require__(153);
|
|
464
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__pages_add_destination_add_destination__ = __webpack_require__(152);
|
466
|
465
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__services_destination_service_destination_service__ = __webpack_require__(86);
|
467
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__services_user_service_signup_service__ = __webpack_require__(156);
|
468
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__angular_common_http__ = __webpack_require__(310);
|
|
466
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__services_user_service_signup_service__ = __webpack_require__(157);
|
|
467
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__angular_common_http__ = __webpack_require__(115);
|
469
|
468
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
470
|
469
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
471
|
470
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -511,7 +510,7 @@ var AppModule = /** @class */ (function () {
|
511
|
510
|
],
|
512
|
511
|
imports: [
|
513
|
512
|
__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */],
|
514
|
|
- __WEBPACK_IMPORTED_MODULE_5__angular_http__["c" /* HttpModule */],
|
|
513
|
+ __WEBPACK_IMPORTED_MODULE_5__angular_http__["a" /* HttpModule */],
|
515
|
514
|
__WEBPACK_IMPORTED_MODULE_16__angular_common_http__["b" /* HttpClientModule */],
|
516
|
515
|
__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["c" /* IonicModule */].forRoot(__WEBPACK_IMPORTED_MODULE_6__app_component__["a" /* MyApp */], {}, {
|
517
|
516
|
links: [
|
|
@@ -558,8 +557,8 @@ var AppModule = /** @class */ (function () {
|
558
|
557
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MapPage; });
|
559
|
558
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
560
|
559
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
|
561
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__ = __webpack_require__(152);
|
562
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__add_destination_add_destination__ = __webpack_require__(151);
|
|
560
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__ = __webpack_require__(153);
|
|
561
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__add_destination_add_destination__ = __webpack_require__(152);
|
563
|
562
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__services_destination_service_destination_service__ = __webpack_require__(86);
|
564
|
563
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
565
|
564
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -593,17 +592,15 @@ var MapPage = /** @class */ (function () {
|
593
|
592
|
_this.getAllDestinations();
|
594
|
593
|
loader.dismiss();
|
595
|
594
|
});
|
596
|
|
- this.initMap();
|
597
|
|
- };
|
598
|
|
- MapPage.prototype.initMap = function () {
|
599
|
|
- var latLng = new google.maps.LatLng(-34.9290, 138.6010);
|
600
|
|
- var mapOptions = {
|
601
|
|
- center: latLng,
|
602
|
|
- zoom: 15,
|
603
|
|
- mapTypeId: google.maps.MapTypeId.ROADMAP
|
604
|
|
- };
|
605
|
|
- this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);
|
606
|
595
|
};
|
|
596
|
+ // initMap(){
|
|
597
|
+ // let latLng = new google.maps.LatLng(-34.9290, 138.6010);
|
|
598
|
+ // let mapOptions = {
|
|
599
|
+ // center: latLng,
|
|
600
|
+ // zoom: 15,
|
|
601
|
+ // mapTypeId: google.maps.mapTypeId
|
|
602
|
+ // }
|
|
603
|
+ // }
|
607
|
604
|
MapPage.prototype.goToDestinationDetails = function ($event, destination) {
|
608
|
605
|
this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__["a" /* DestinationDetailsPage */], destination);
|
609
|
606
|
};
|
|
@@ -618,16 +615,18 @@ var MapPage = /** @class */ (function () {
|
618
|
615
|
};
|
619
|
616
|
__decorate([
|
620
|
617
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["_8" /* ViewChild */])('map'),
|
621
|
|
- __metadata("design:type", Object)
|
|
618
|
+ __metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["t" /* ElementRef */])
|
622
|
619
|
], MapPage.prototype, "mapElement", void 0);
|
623
|
620
|
MapPage = __decorate([
|
624
|
621
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
|
625
|
|
- selector: 'page-map',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/map/map.html"*/'<!-- \n Generated template for the MapPage page.\n\n See http://ionicframework.com/docs/components/#navigation for more info on\n Ionic pages and navigation.\n-->\n<ion-header>\n\n <ion-navbar>\n <ion-title>map</ion-title>\n </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n <div #map id="map"></div>\n\n <ion-list>\n <ion-item-sliding *ngFor = "let destination of destinations">\n <ion-item>\n <div>{{ destination.city }}</div>\n <div>{{ destination.country }}</div>\n <button ion-button (click)="goToDestinationDetails($event, destination)">Details</button>\n </ion-item>\n </ion-item-sliding>\n </ion-list>\n <button ion-button (click)=goToAddDestination()>Add Destination</button>\n\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/map/map.html"*/,
|
|
622
|
+ selector: 'page-map',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/map/map.html"*/'<!-- \n Generated template for the MapPage page.\n\n See http://ionicframework.com/docs/components/#navigation for more info on\n Ionic pages and navigation.\n-->\n<ion-header>\n\n <ion-navbar>\n <ion-title>map</ion-title>\n </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n <!-- <div #map id="map"></div> -->\n\n <ion-list>\n <ion-item-sliding *ngFor = "let destination of destinations">\n <ion-item>\n <div>{{ destination.city }}</div>\n <div>{{ destination.country }}</div>\n <button ion-button (click)="goToDestinationDetails($event, destination)">Details</button>\n </ion-item>\n </ion-item-sliding>\n </ion-list>\n <button ion-button (click)=goToAddDestination()>Add Destination</button>\n\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/map/map.html"*/,
|
626
|
623
|
}),
|
627
|
|
- __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]) === "function" && _b || Object, typeof (_c = typeof __WEBPACK_IMPORTED_MODULE_4__services_destination_service_destination_service__["a" /* DestinationService */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_4__services_destination_service_destination_service__["a" /* DestinationService */]) === "function" && _c || Object, typeof (_d = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* LoadingController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* LoadingController */]) === "function" && _d || Object])
|
|
624
|
+ __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */],
|
|
625
|
+ __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */],
|
|
626
|
+ __WEBPACK_IMPORTED_MODULE_4__services_destination_service_destination_service__["a" /* DestinationService */],
|
|
627
|
+ __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* LoadingController */]])
|
628
|
628
|
], MapPage);
|
629
|
629
|
return MapPage;
|
630
|
|
- var _a, _b, _c, _d;
|
631
|
630
|
}());
|
632
|
631
|
|
633
|
632
|
//# sourceMappingURL=map.js.map
|
|
@@ -641,9 +640,9 @@ var MapPage = /** @class */ (function () {
|
641
|
640
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MyApp; });
|
642
|
641
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
643
|
642
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
|
644
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(353);
|
645
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(350);
|
646
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(354);
|
|
643
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(352);
|
|
644
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(349);
|
|
645
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(353);
|
647
|
646
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
648
|
647
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
649
|
648
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -685,13 +684,13 @@ var MyApp = /** @class */ (function () {
|
685
|
684
|
|
686
|
685
|
"use strict";
|
687
|
686
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DestinationService; });
|
688
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_http__ = __webpack_require__(212);
|
|
687
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__(115);
|
689
|
688
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
|
690
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs__ = __webpack_require__(213);
|
|
689
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs__ = __webpack_require__(215);
|
691
|
690
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_rxjs__);
|
692
|
691
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs_add_operator_map__ = __webpack_require__(255);
|
693
|
692
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs_add_operator_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_rxjs_add_operator_map__);
|
694
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_catch__ = __webpack_require__(226);
|
|
693
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_catch__ = __webpack_require__(228);
|
695
|
694
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_catch___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_catch__);
|
696
|
695
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
697
|
696
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -708,45 +707,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
708
|
707
|
|
709
|
708
|
|
710
|
709
|
var DestinationService = /** @class */ (function () {
|
711
|
|
- function DestinationService(http) {
|
712
|
|
- this.http = http;
|
|
710
|
+ function DestinationService(httpClient) {
|
|
711
|
+ this.httpClient = httpClient;
|
713
|
712
|
this.destinationUrl = "http://localhost:9090/api/v1/destinations";
|
714
|
713
|
}
|
715
|
|
- //CREATE
|
716
|
|
- DestinationService.prototype.createDestination = function (body) {
|
717
|
|
- var bodyString = JSON.stringify(body);
|
718
|
|
- var headers = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["a" /* Headers */]({ 'Content-Type': 'application/json' });
|
719
|
|
- var options = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["d" /* RequestOptions */]({ headers: headers });
|
720
|
|
- return this.http.post(this.destinationUrl, bodyString, options).map(function (res) { return res.json(); })
|
721
|
|
- .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
|
|
714
|
+ DestinationService.prototype.createDestination = function (destination) {
|
|
715
|
+ return this.httpClient
|
|
716
|
+ .post(this.destinationUrl, destination)
|
|
717
|
+ .catch(function (err) {
|
|
718
|
+ console.error('An error occurred: ', err.error);
|
|
719
|
+ return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(err.statusText);
|
|
720
|
+ });
|
722
|
721
|
};
|
723
|
|
- //READ
|
724
|
722
|
DestinationService.prototype.getAllDestinations = function () {
|
725
|
|
- return this.http.get(this.destinationUrl).map(function (res) { return res.json(); })
|
726
|
|
- .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
|
727
|
|
- };
|
728
|
|
- DestinationService.prototype.getDestinationById = function (destinationId) {
|
729
|
|
- return this.http.get("this.destinationUrl/" + destinationId)
|
730
|
|
- .map(function (response) {
|
731
|
|
- return response.json();
|
|
723
|
+ return this.httpClient.get(this.destinationUrl)
|
|
724
|
+ .catch(function (err) {
|
|
725
|
+ console.error('An error occurred: ', err.error);
|
|
726
|
+ return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(err.statusText);
|
732
|
727
|
});
|
733
|
728
|
};
|
734
|
|
- //UPDATE
|
735
|
|
- DestinationService.prototype.updateDestination = function (body) {
|
736
|
|
- var bodyString = JSON.stringify(body);
|
737
|
|
- var headers = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["a" /* Headers */]({ 'Content-Type': 'application/json' });
|
738
|
|
- var options = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["d" /* RequestOptions */]({ headers: headers });
|
739
|
|
- return this.http.put(this.destinationUrl + "/" + body['id'], body, options).map(function (res) { return res.json(); })
|
740
|
|
- .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
|
741
|
|
- };
|
742
|
|
- //DELETE
|
743
|
|
- DestinationService.prototype.deleteDestination = function (id) {
|
744
|
|
- return this.http.delete(this.destinationUrl + "/" + id).map(function (res) { return res.json(); })
|
745
|
|
- .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
|
746
|
|
- };
|
747
|
729
|
DestinationService = __decorate([
|
748
|
730
|
Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["A" /* Injectable */])(),
|
749
|
|
- __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_http__["b" /* Http */]])
|
|
731
|
+ __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */]])
|
750
|
732
|
], DestinationService);
|
751
|
733
|
return DestinationService;
|
752
|
734
|
}());
|
|
@@ -755,5 +737,5 @@ var DestinationService = /** @class */ (function () {
|
755
|
737
|
|
756
|
738
|
/***/ })
|
757
|
739
|
|
758
|
|
-},[355]);
|
|
740
|
+},[354]);
|
759
|
741
|
//# sourceMappingURL=main.js.map
|