Eric Foster пре 6 година
родитељ
комит
d56357e647

+ 1
- 1
.sourcemaps/main.js.map
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 49
- 0
node_modules/@ionic-native/google-maps/README.md Прегледај датотеку

@@ -0,0 +1,49 @@
1
+# @ionic-native/google-maps (v4.9.1)
2
+
3
+@ionic-native/google-maps plugin is a wrapper plugin for [cordova-plugin-googlemaps](https://github.com/mapsplugin/cordova-plugin-googlemaps) for Ionic framework.
4
+
5
+Ionic Native wraps plugin callbacks in a Promise or Observable, providing a common interface for all plugins and making it easy to use plugins with Angular change detection.
6
+
7
+------------------------
8
+
9
+## Installation
10
+
11
+First of all, you need to generate API keys for Google Maps APIs.
12
+- [How to generate API keys?](https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/api_key/generate_api_key.md)
13
+
14
+Second, run following command to install `@ionic-native/core` and `@ionic-native/google-maps` plugins in your project.
15
+
16
+```
17
+npm install @ionic-native/core @ionic-native/google-maps
18
+
19
+ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="..." --variable API_KEY_FOR_IOS="..."
20
+```
21
+
22
+------------------------
23
+
24
+## Documentation
25
+
26
+For the full Ionic Native documentation, please checkout this page.
27
+
28
+- [\@ionic-native/google-maps official documents](https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/README.md)
29
+
30
+
31
+Also there are documents/demos for your help:
32
+
33
+- [cordova-plugin-googlemaps official documents](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/README.md)
34
+
35
+- [@ionic-native/google-maps get started](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/ionic-native/README.md)
36
+
37
+- [@ionic-native/google-maps quick example](https://github.com/mapsplugin/ionic-googlemaps-quickdemo)
38
+
39
+- [\@ionic-native/google-maps slide](https://docs.google.com/presentation/d/e/2PACX-1vScoho1ensbR4qCI9AIuQN55BZVvK73pAjI7sumDvW3CrxxHnrmpXWUjx2-8CpFibqU1EjLKCRhuthJ/pub?start=false&loop=false&delayms=3000)
40
+
41
+
42
+------------------------
43
+
44
+## Troubles?
45
+
46
+Before asking your trouble, please check the trouble shooting guides.
47
+- [Trouble shootings](https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/troubleshootings/README.md)
48
+
49
+If you can't solve your problem, please report to [ionic-native-google-maps](https://github.com/ionic-team/ionic-native-google-maps/issues) repository.

+ 2447
- 0
node_modules/@ionic-native/google-maps/index.d.ts
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 4133
- 0
node_modules/@ionic-native/google-maps/index.js
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 1
- 0
node_modules/@ionic-native/google-maps/index.js.map
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 1
- 0
node_modules/@ionic-native/google-maps/index.metadata.json
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 51
- 0
node_modules/@ionic-native/google-maps/package.json Прегледај датотеку

@@ -0,0 +1,51 @@
1
+{
2
+  "_from": "@ionic-native/google-maps",
3
+  "_id": "@ionic-native/google-maps@4.9.1",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-OxaxA31a7g+7j8FTGdw1Kpptbx1wulJZ12ycCVdG1V4zFezuzJXGshkzf7X9TebyKq32sp1SdddFbx4bERkN9Q==",
6
+  "_location": "/@ionic-native/google-maps",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "tag",
10
+    "registry": true,
11
+    "raw": "@ionic-native/google-maps",
12
+    "name": "@ionic-native/google-maps",
13
+    "escapedName": "@ionic-native%2fgoogle-maps",
14
+    "scope": "@ionic-native",
15
+    "rawSpec": "",
16
+    "saveSpec": null,
17
+    "fetchSpec": "latest"
18
+  },
19
+  "_requiredBy": [
20
+    "#USER",
21
+    "/"
22
+  ],
23
+  "_resolved": "https://registry.npmjs.org/@ionic-native/google-maps/-/google-maps-4.9.1.tgz",
24
+  "_shasum": "bb8e56ad77964d9345c50b7f350b77ba5ffbfe0a",
25
+  "_spec": "@ionic-native/google-maps",
26
+  "_where": "/Users/ericf/ZCWProjects/SharedTravelMapIonicApp",
27
+  "author": {
28
+    "name": "ionic"
29
+  },
30
+  "bugs": {
31
+    "url": "https://github.com/ionic-team/ionic-native-google-maps/issues"
32
+  },
33
+  "bundleDependencies": false,
34
+  "deprecated": false,
35
+  "description": "Ionic Native plugin for Google Maps",
36
+  "homepage": "https://github.com/ionic-team/ionic-native-google-maps",
37
+  "license": "MIT",
38
+  "module": "index.js",
39
+  "name": "@ionic-native/google-maps",
40
+  "peerDependencies": {
41
+    "@ionic-native/core": "^4.9.2",
42
+    "@angular/core": "*",
43
+    "rxjs": "^5.0.1"
44
+  },
45
+  "repository": {
46
+    "type": "git",
47
+    "url": "git+https://github.com/ionic-team/ionic-native-google-maps.git"
48
+  },
49
+  "typings": "index.d.ts",
50
+  "version": "4.9.1"
51
+}

+ 5
- 0
package-lock.json Прегледај датотеку

@@ -112,6 +112,11 @@
112 112
       "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-4.9.1.tgz",
113 113
       "integrity": "sha512-5NLeMQ4C8VH0fApJw/G2U2AMqMCaiWxiky1k3Mr5ShYaw6QvSQrLxD06rInOg5po59n02qdcqCiSEw1JnQYn1g=="
114 114
     },
115
+    "@ionic-native/google-maps": {
116
+      "version": "4.9.1",
117
+      "resolved": "https://registry.npmjs.org/@ionic-native/google-maps/-/google-maps-4.9.1.tgz",
118
+      "integrity": "sha512-OxaxA31a7g+7j8FTGdw1Kpptbx1wulJZ12ycCVdG1V4zFezuzJXGshkzf7X9TebyKq32sp1SdddFbx4bERkN9Q=="
119
+    },
115 120
     "@ionic-native/splash-screen": {
116 121
       "version": "4.9.1",
117 122
       "resolved": "https://registry.npmjs.org/@ionic-native/splash-screen/-/splash-screen-4.9.1.tgz",

+ 1
- 0
package.json Прегледај датотеку

@@ -23,6 +23,7 @@
23 23
     "@angular/platform-browser-dynamic": "5.2.11",
24 24
     "@angular/router": "^6.0.9",
25 25
     "@ionic-native/core": "4.9.1",
26
+    "@ionic-native/google-maps": "^4.9.1",
26 27
     "@ionic-native/splash-screen": "4.9.1",
27 28
     "@ionic-native/status-bar": "4.9.1",
28 29
     "@ionic/storage": "2.1.3",

+ 1
- 4
src/index.html Прегледај датотеку

@@ -6,7 +6,6 @@
6 6
   <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
7 7
   <meta name="format-detection" content="telephone=no">
8 8
   <meta name="msapplication-tap-highlight" content="no">
9
-  <meta http-equiv="Content-Security-Policy" content="script-src 'self' https://maps.googleapis.com/ https://maps.gstatic.com/ https://mts0.googleapis.com/ 'unsafe-inline' 'unsafe-eval'">
10 9
 
11 10
   <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
12 11
   <link rel="manifest" href="manifest.json">
@@ -15,7 +14,7 @@
15 14
   <!-- add to homescreen for ios -->
16 15
   <meta name="apple-mobile-web-app-capable" content="yes">
17 16
   <meta name="apple-mobile-web-app-status-bar-style" content="black">
18
-
17
+  
19 18
   <!-- cordova.js required for cordova apps (remove if not needed) -->
20 19
   <script src="cordova.js"></script>
21 20
 
@@ -36,8 +35,6 @@
36 35
   <!-- Ionic's root component and where the app will load -->
37 36
   <ion-app></ion-app>
38 37
 
39
-  <script type="text/javascript" src="https://maps.googleapis.com/map/api/js?key=AIzaSyDoZ4iE0CqmLVSJjLZnJmFORZuuR6Ei55c&callback=initMap"></script>
40
-
41 38
   <!-- The polyfills js is generated during the build process -->
42 39
   <script src="build/polyfills.js"></script>
43 40
 

+ 2
- 2
src/pages/add-destination/add-destination.ts Прегледај датотеку

@@ -16,8 +16,8 @@ export class AddDestinationPage {
16 16
   destinationForm: FormGroup;
17 17
   destination: Destination;
18 18
   profile : Profile = { 
19
-    id : 1,
20
-    userName : "JohnDoe",
19
+    id : 3,
20
+    userName : "johnDoe",
21 21
     homeCity : "",
22 22
     homeCountry : "",
23 23
     description : "",

+ 0
- 6
src/pages/destination-details/destination-details.html Прегледај датотеку

@@ -1,9 +1,3 @@
1
-<!--
2
-  Generated template for the DestinationDetailsPage page.
3
-
4
-  See http://ionicframework.com/docs/components/#navigation for more info on
5
-  Ionic pages and navigation.
6
--->
7 1
 <ion-header>
8 2
 
9 3
   <ion-navbar>

+ 1
- 1
src/pages/map/map.html Прегледај датотеку

@@ -15,7 +15,7 @@
15 15
 
16 16
 <ion-content padding>
17 17
 
18
-  <div #map id="map"></div>
18
+  <!-- <div #map id="map"></div> -->
19 19
 
20 20
   <ion-list>
21 21
     <ion-item-sliding *ngFor = "let destination of destinations">

+ 12
- 16
src/pages/map/map.ts Прегледај датотеку

@@ -1,8 +1,10 @@
1
-import { Component, ViewChild } from '@angular/core';
1
+import { Component, ViewChild, ElementRef } from '@angular/core';
2 2
 import { IonicPage, NavController, NavParams, LoadingController } from 'ionic-angular';
3 3
 import { DestinationDetailsPage } from '../destination-details/destination-details';
4 4
 import { AddDestinationPage } from '../add-destination/add-destination';
5 5
 import { DestinationService } from '../../services/destination-service/destination-service';
6
+import { GoogleMaps, GoogleMap, LatLng, GoogleMapsEvent, Marker, MarkerOptions } from '@ionic-native/google-maps';
7
+declare var google;
6 8
 
7 9
 @IonicPage()
8 10
 @Component({
@@ -11,7 +13,7 @@ import { DestinationService } from '../../services/destination-service/destinati
11 13
 })
12 14
 export class MapPage {
13 15
 
14
-  @ViewChild('map') mapElement;
16
+  @ViewChild('map') mapElement: ElementRef;
15 17
   map: any;
16 18
   public destinations: any = [];
17 19
   public destination: any = {};
@@ -33,22 +35,18 @@ export class MapPage {
33 35
       loader.dismiss();
34 36
     });
35 37
 
36
-    this.initMap();
37
-
38 38
   }
39 39
 
40
-  initMap(){
41
-    let latLng = new google.maps.LatLng(-34.9290, 138.6010)
42
-
43
-    let mapOptions = {
44
-      center: latLng,
45
-      zoom: 15,
46
-      mapTypeId: google.maps.MapTypeId.ROADMAP
47
-    }
40
+  // initMap(){
41
+  //   let latLng = new google.maps.LatLng(-34.9290, 138.6010);
48 42
 
49
-    this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);
43
+  //   let mapOptions = {
44
+  //     center: latLng,
45
+  //     zoom: 15,
46
+  //     mapTypeId: google.maps.mapTypeId
47
+  //   }
50 48
 
51
-  }
49
+  // }
52 50
 
53 51
   goToDestinationDetails($event, destination){
54 52
     this.navCtrl.push(DestinationDetailsPage, destination);
@@ -65,6 +63,4 @@ export class MapPage {
65 63
     this.navCtrl.push(AddDestinationPage);
66 64
   }
67 65
 
68
-  
69
-
70 66
 }

+ 14
- 34
src/services/destination-service/destination-service.ts Прегледај датотеку

@@ -1,4 +1,4 @@
1
-import { Http, Response, Headers, RequestOptions } from '@angular/http'
1
+import { HttpClient, HttpErrorResponse } from "@angular/common/http"
2 2
 import { Injectable } from '@angular/core';
3 3
 import { Observable } from 'rxjs';
4 4
 import { Destination } from '../../model/destination-model';
@@ -11,44 +11,24 @@ export class DestinationService {
11 11
   
12 12
   private destinationUrl = "http://localhost:9090/api/v1/destinations"
13 13
 
14
-  constructor(private http: Http) {
14
+  constructor(private httpClient: HttpClient) {
15 15
   }
16 16
 
17
-  //CREATE
18
-  createDestination(body: Object): Observable<Destination> {
19
-    let bodyString = JSON.stringify(body);
20
-    let headers = new Headers({ 'Content-Type' : 'application/json' });
21
-    let options = new RequestOptions({ headers: headers });
22
-    return this.http.post(this.destinationUrl, bodyString, options).map((res:Response) => res.json())
23
-    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
24
-  }
25
-
26
-  //READ
27
-  getAllDestinations() : Observable<Destination[]> {
28
-    return this.http.get(this.destinationUrl).map((res:Response) => res.json())
29
-    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
30
-  }
31
-
32
-  getDestinationById(destinationId) : Observable<Destination> {
33
-    return this.http.get(`this.destinationUrl/${destinationId}`)
34
-      .map(response => {
35
-        return response.json();
17
+  createDestination(destination: Destination): Observable<Destination> {
18
+    return this.httpClient
19
+      .post<Destination>(this.destinationUrl, destination)
20
+      .catch((err: HttpErrorResponse) => {
21
+        console.error('An error occurred: ', err.error);
22
+        return Observable.throw(err.statusText);
36 23
       })
37 24
   }
38 25
 
39
-  //UPDATE
40
-  updateDestination(body: Object): Observable<Destination> {
41
-    let bodyString = JSON.stringify(body);
42
-    let headers = new Headers({ 'Content-Type' : 'application/json' });
43
-    let options = new RequestOptions({ headers: headers });
44
-    return this.http.put(`${this.destinationUrl}/${body['id']}`, body, options).map((res:Response) => res.json())
45
-    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
46
-  }
47
-
48
-  //DELETE
49
-  deleteDestination(id:string): Observable<Destination> {
50
-    return this.http.delete(`${this.destinationUrl}/${id}`).map((res:Response) => res.json())
51
-    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
26
+  getAllDestinations() : Observable<Destination[]> {
27
+    return this.httpClient.get(this.destinationUrl)
28
+    .catch((err:HttpErrorResponse) => {
29
+      console.error('An error occurred: ', err.error);
30
+      return Observable.throw(err.statusText);
31
+    });
52 32
   }
53 33
 
54 34
 }

+ 0
- 1
src/services/user-service/signup-service.ts Прегледај датотеку

@@ -11,7 +11,6 @@ export class SignupService {
11 11
     constructor(protected httpClient: HttpClient) {
12 12
     }
13 13
 
14
-    //CREATE
15 14
     createUser(user: User): Observable<User> {
16 15
       return this.httpClient
17 16
         .post<User>(this.userUrl, user)

+ 2
- 2
www/build/0.js Прегледај датотеку

@@ -8,8 +8,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignupPageModule", function() { return SignupPageModule; });
9 9
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10 10
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__signup__ = __webpack_require__(155);
12
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_user_service_signup_service__ = __webpack_require__(156);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__signup__ = __webpack_require__(156);
12
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_user_service_signup_service__ = __webpack_require__(157);
13 13
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
14 14
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15 15
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);

+ 1
- 1
www/build/1.js Прегледај датотеку

@@ -8,7 +8,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProfilePageModule", function() { return ProfilePageModule; });
9 9
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10 10
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile__ = __webpack_require__(154);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile__ = __webpack_require__(155);
12 12
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
13 13
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14 14
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);

+ 1
- 1
www/build/3.js Прегледај датотеку

@@ -8,7 +8,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginPageModule", function() { return LoginPageModule; });
9 9
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10 10
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login__ = __webpack_require__(153);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login__ = __webpack_require__(154);
12 12
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
13 13
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14 14
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);

+ 1
- 1
www/build/4.js Прегледај датотеку

@@ -8,7 +8,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DestinationDetailsPageModule", function() { return DestinationDetailsPageModule; });
9 9
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10 10
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details__ = __webpack_require__(152);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details__ = __webpack_require__(153);
12 12
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
13 13
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14 14
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);

+ 1
- 1
www/build/5.js Прегледај датотеку

@@ -8,7 +8,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddDestinationPageModule", function() { return AddDestinationPageModule; });
9 9
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10 10
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__add_destination__ = __webpack_require__(151);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__add_destination__ = __webpack_require__(152);
12 12
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__ = __webpack_require__(86);
13 13
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
14 14
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;

+ 73
- 91
www/build/main.js Прегледај датотеку

@@ -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

+ 1
- 1
www/build/main.js.map
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 31129
- 31129
www/build/vendor.js
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 1
- 1
www/build/vendor.js.map
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 4
- 4
www/index.html Прегледај датотеку

@@ -1,12 +1,14 @@
1 1
 <!DOCTYPE html>
2 2
 <html lang="en" dir="ltr">
3 3
 <head>
4
+  <script data-ionic="inject">
5
+    (function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='5.2.11';i.staticDir='build/';})(window);
6
+  </script>
4 7
   <meta charset="UTF-8">
5 8
   <title>Ionic App</title>
6 9
   <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
7 10
   <meta name="format-detection" content="telephone=no">
8 11
   <meta name="msapplication-tap-highlight" content="no">
9
-  <meta http-equiv="Content-Security-Policy" content="script-src 'self' https://maps.googleapis.com/ https://maps.gstatic.com/ https://mts0.googleapis.com/ 'unsafe-inline' 'unsafe-eval'">
10 12
 
11 13
   <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
12 14
   <link rel="manifest" href="manifest.json">
@@ -15,7 +17,7 @@
15 17
   <!-- add to homescreen for ios -->
16 18
   <meta name="apple-mobile-web-app-capable" content="yes">
17 19
   <meta name="apple-mobile-web-app-status-bar-style" content="black">
18
-
20
+  
19 21
   <!-- cordova.js required for cordova apps (remove if not needed) -->
20 22
   <script src="cordova.js"></script>
21 23
 
@@ -36,8 +38,6 @@
36 38
   <!-- Ionic's root component and where the app will load -->
37 39
   <ion-app></ion-app>
38 40
 
39
-  <script type="text/javascript" src="https://maps.googleapis.com/map/api/js?key=AIzaSyDoZ4iE0CqmLVSJjLZnJmFORZuuR6Ei55c&callback=initMap"></script>
40
-
41 41
   <!-- The polyfills js is generated during the build process -->
42 42
   <script src="build/polyfills.js"></script>
43 43