Eric Foster 6 years ago
parent
commit
cb8aa624de

+ 1
- 1
.sourcemaps/2.js.map View File

@@ -1 +1 @@
1
-{"version":3,"sources":["../../src/pages/map/map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAyC;AACO;AAChB;AAC4D;AAW5F;IAAA;IAA4B,CAAC;IAAhB,aAAa;QATzB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,qDAAO;aACR;YACD,OAAO,EAAE;gBACP,6GAAuB;gBACvB,sEAAe,CAAC,QAAQ,CAAC,qDAAO,CAAC;aAClC;SACF,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAAA;AAAH","file":"2.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { MapPage } from './map';\nimport { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';\n\n@NgModule({\n  declarations: [\n    MapPage,\n  ],\n  imports: [\n    DestinationsApiProvider,\n    IonicPageModule.forChild(MapPage),\n  ],\n})\nexport class MapPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/map/map.module.ts"],"sourceRoot":""}
1
+{"version":3,"sources":["../../src/pages/map/map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAyC;AACO;AAChB;AAC4D;AAW5F;IAAA;IAA4B,CAAC;IAAhB,aAAa;QATzB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,qDAAO;aACR;YACD,OAAO,EAAE;gBACP,6GAAkB;gBAClB,sEAAe,CAAC,QAAQ,CAAC,qDAAO,CAAC;aAClC;SACF,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAAA;AAAH","file":"2.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { MapPage } from './map';\nimport { DestinationService } from '../../services/destination-service/destination-service';\n\n@NgModule({\n  declarations: [\n    MapPage,\n  ],\n  imports: [\n    DestinationService,\n    IonicPageModule.forChild(MapPage),\n  ],\n})\nexport class MapPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/map/map.module.ts"],"sourceRoot":""}

+ 1
- 1
.sourcemaps/5.js.map View File

@@ -1 +1 @@
1
-{"version":3,"sources":["../../src/pages/add-destination/add-destination.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAyC;AACO;AACO;AAUvD;IAAA;IAAuC,CAAC;IAA3B,wBAAwB;QARpC,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,4EAAkB;aACnB;YACD,OAAO,EAAE;gBACP,sEAAe,CAAC,QAAQ,CAAC,4EAAkB,CAAC;aAC7C;SACF,CAAC;OACW,wBAAwB,CAAG;IAAD,+BAAC;CAAA;AAAH","file":"5.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { AddDestinationPage } from './add-destination';\n\n@NgModule({\n  declarations: [\n    AddDestinationPage,\n  ],\n  imports: [\n    IonicPageModule.forChild(AddDestinationPage),\n  ],\n})\nexport class AddDestinationPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/add-destination/add-destination.module.ts"],"sourceRoot":""}
1
+{"version":3,"sources":["../../src/pages/add-destination/add-destination.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAyC;AACO;AACO;AACqC;AAW5F;IAAA;IAAuC,CAAC;IAA3B,wBAAwB;QATpC,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,4EAAkB;aACnB;YACD,OAAO,EAAE;gBACP,6GAAkB;gBAClB,sEAAe,CAAC,QAAQ,CAAC,4EAAkB,CAAC;aAC7C;SACF,CAAC;OACW,wBAAwB,CAAG;IAAD,+BAAC;CAAA;AAAH","file":"5.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { AddDestinationPage } from './add-destination';\nimport { DestinationService } from '../../services/destination-service/destination-service';\n\n@NgModule({\n  declarations: [\n    AddDestinationPage,\n  ],\n  imports: [\n    DestinationService,\n    IonicPageModule.forChild(AddDestinationPage),\n  ],\n})\nexport class AddDestinationPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/add-destination/add-destination.module.ts"],"sourceRoot":""}

+ 1
- 1
.sourcemaps/main.js.map
File diff suppressed because it is too large
View File


+ 2
- 3
src/app/app.module.ts View File

@@ -8,14 +8,13 @@ import { HttpModule } from '@angular/http';
8 8
 import { MyApp } from './app.component';
9 9
 import { HomePage } from '../pages/home/home';
10 10
 
11
-import { OktaAuthModule, OktaCallbackComponent } from '@okta/okta-angular';
12 11
 import { LoginPage } from '../pages/login/login';
13 12
 import { SignupPage } from '../pages/signup/signup';
14 13
 import { ProfilePage } from '../pages/profile/profile';
15 14
 import { MapPage } from '../pages/map/map';
16 15
 import { DestinationDetailsPage } from '../pages/destination-details/destination-details';
17
-import { DestinationsApiProvider } from '../providers/destinations-api/destinations-api';
18 16
 import { AddDestinationPage } from '../pages/add-destination/add-destination';
17
+import { DestinationService } from '../services/destination-service/destination-service';
19 18
 
20 19
 const config = {
21 20
   issuer: 'https://dev-270119.oktapreview.com/oauth2/default',
@@ -53,8 +52,8 @@ const config = {
53 52
   providers: [
54 53
     StatusBar,
55 54
     SplashScreen,
55
+    DestinationService,
56 56
     {provide: ErrorHandler, useClass: IonicErrorHandler},
57
-    DestinationsApiProvider
58 57
   ]
59 58
 })
60 59
 export class AppModule {}

+ 16
- 0
src/model/destination-model.ts View File

@@ -0,0 +1,16 @@
1
+import { Profile } from "./profile-model";
2
+
3
+export class Destination {
4
+    constructor(
5
+        public id : number,
6
+        public destinationState : string,
7
+        public city : string,
8
+        public country : string,
9
+        public startDate : Date,
10
+        public endDate : Date,
11
+        public travelType : string,
12
+        public favoriteThing : string,
13
+        public notes : string,
14
+        public profile : Profile
15
+    ){}
16
+}

+ 10
- 0
src/model/login-model.ts View File

@@ -0,0 +1,10 @@
1
+import { User } from "./user-model";
2
+
3
+export class Login {
4
+    constructor(
5
+        public id : number,
6
+        public email : string,
7
+        public password : string,
8
+        public user : User
9
+    ){}
10
+}

+ 14
- 0
src/model/profile-model.ts View File

@@ -0,0 +1,14 @@
1
+import { User } from "./user-model";
2
+
3
+export class Profile {
4
+    constructor(
5
+        public id : number,
6
+        public userName : string,
7
+        public homeCity : string,
8
+        public homeCountry : string,
9
+        public description : string,
10
+        public imagePath : string,
11
+        public friendList : Array<Profile>,
12
+        public user : User
13
+    ){}
14
+}

+ 12
- 0
src/model/user-model.ts View File

@@ -0,0 +1,12 @@
1
+import { Profile } from "./profile-model";
2
+import { Login } from "./login-model";
3
+
4
+export class User {
5
+    constructor(
6
+        public id : number,
7
+        public firstName : string,
8
+        public lastName : string,
9
+        public login : Login,
10
+        public profile : Profile
11
+    ){}
12
+}

+ 24
- 18
src/pages/add-destination/add-destination.html View File

@@ -1,9 +1,3 @@
1
-<!--
2
-  Generated template for the AddDestinationPage 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>
@@ -15,17 +9,29 @@
15 9
 
16 10
 <ion-content padding>
17 11
   <form [formGroup]="destinationForm">
18
-      <ion-item>
19
-          <ion-label floating>City</ion-label>
20
-          <ion-input [formControl]="destinationForm.controls['city']" type="text"></ion-input>
21
-      </ion-item>
22
-
23
-      <ion-item>
24
-          <ion-label floating>Country</ion-label>
25
-          <ion-input [formControl]="destinationForm.controls['country']" type="text"></ion-input>
26
-      </ion-item>
27
-
28
-      <button ion-button full color="primary" style="margin-top: 20px;" 
29
-      type="submit" [disabled]="!destinationForm.valid" (click)=createDestination()>Create</button>        
12
+        <ion-list radio-group formControlName="destinationState">
13
+            <ion-item>
14
+              <ion-label>Want to go</ion-label>
15
+              <ion-radio value="future"></ion-radio>
16
+            </ion-item>
17
+            <ion-item>
18
+              <ion-label>Have been to</ion-label>
19
+              <ion-radio value="past"></ion-radio>
20
+            </ion-item>
21
+        </ion-list>
22
+
23
+    <ion-item>
24
+      <ion-label stacked>City</ion-label>
25
+      <ion-input formControlName="city" type="text"></ion-input>
26
+    </ion-item>
27
+
28
+    <ion-item>
29
+      <ion-label stacked>Country</ion-label>
30
+      <ion-input formControlName="country" type="text"></ion-input>
31
+    </ion-item>
32
+
33
+    <button ion-button full color="primary" style="margin-top: 20px;" 
34
+    type="submit" [disabled]="!destinationForm.valid" (click)=createDestination()>Add</button>
35
+
30 36
   </form>
31 37
 </ion-content>

+ 2
- 2
src/pages/add-destination/add-destination.module.ts View File

@@ -1,14 +1,14 @@
1 1
 import { NgModule } from '@angular/core';
2 2
 import { IonicPageModule } from 'ionic-angular';
3 3
 import { AddDestinationPage } from './add-destination';
4
-import { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';
4
+import { DestinationService } from '../../services/destination-service/destination-service';
5 5
 
6 6
 @NgModule({
7 7
   declarations: [
8 8
     AddDestinationPage,
9 9
   ],
10 10
   imports: [
11
-    DestinationsApiProvider,
11
+    DestinationService,
12 12
     IonicPageModule.forChild(AddDestinationPage),
13 13
   ],
14 14
 })

+ 27
- 6
src/pages/add-destination/add-destination.ts View File

@@ -1,7 +1,10 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { IonicPage, NavController, NavParams } from 'ionic-angular';
3
-import { FormBuilder, FormGroup } from '@angular/forms';
4
-import { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';
3
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
4
+import { DestinationService } from '../../services/destination-service/destination-service';
5
+import { Destination } from '../../model/destination-model';
6
+import { MapPage } from '../map/map';
7
+import { Profile } from '../../model/profile-model';
5 8
 
6 9
 /**
7 10
  * Generated class for the AddDestinationPage page.
@@ -18,12 +21,24 @@ import { DestinationsApiProvider } from '../../providers/destinations-api/destin
18 21
 export class AddDestinationPage {
19 22
 
20 23
   destinationForm: FormGroup;
24
+  destination: Destination;
25
+  profile : Profile = { 
26
+    id : 1,
27
+    userName : "JohnDoe",
28
+    homeCity : "",
29
+    homeCountry : "",
30
+    description : "",
31
+    imagePath : "",
32
+    friendList : null,
33
+    user : null
34
+  };
21 35
 
22 36
   constructor(public navCtrl: NavController, public navParams: NavParams, 
23
-    private formBuilder: FormBuilder, public destinationApiProvider: DestinationsApiProvider) {
37
+    private formBuilder: FormBuilder, public destinationService: DestinationService) {
24 38
     this.destinationForm = this.formBuilder.group({
25
-      city: [''],
26
-      country: ['']
39
+      destinationState: ['', Validators.required],
40
+      city: ['', Validators.required],
41
+      country: ['', Validators.required]
27 42
     });
28 43
   }
29 44
 
@@ -32,7 +47,13 @@ export class AddDestinationPage {
32 47
   }
33 48
 
34 49
   createDestination() {
35
-
50
+    this.destination = this.destinationForm.value;
51
+    this.destination.profile = this.profile;
52
+    this.destinationService.createDestination(this.destination).subscribe(data => this.destination = data as Destination,
53
+      err => {
54
+        console.log(err);
55
+      })
56
+      this.navCtrl.push(MapPage);
36 57
   }
37 58
 
38 59
 }

+ 0
- 6
src/pages/login/login.html View File

@@ -1,9 +1,3 @@
1
-<!--
2
-  Generated template for the LoginPage 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>

+ 2
- 2
src/pages/map/map.module.ts View File

@@ -1,14 +1,14 @@
1 1
 import { NgModule } from '@angular/core';
2 2
 import { IonicPageModule } from 'ionic-angular';
3 3
 import { MapPage } from './map';
4
-import { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';
4
+import { DestinationService } from '../../services/destination-service/destination-service';
5 5
 
6 6
 @NgModule({
7 7
   declarations: [
8 8
     MapPage,
9 9
   ],
10 10
   imports: [
11
-    DestinationsApiProvider,
11
+    DestinationService,
12 12
     IonicPageModule.forChild(MapPage),
13 13
   ],
14 14
 })

+ 8
- 18
src/pages/map/map.ts View File

@@ -1,15 +1,8 @@
1 1
 import { Component } from '@angular/core';
2 2
 import { IonicPage, NavController, NavParams, LoadingController } from 'ionic-angular';
3 3
 import { DestinationDetailsPage } from '../destination-details/destination-details';
4
-import { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';
5 4
 import { AddDestinationPage } from '../add-destination/add-destination';
6
-
7
-/**
8
- * Generated class for the MapPage page.
9
- *
10
- * See https://ionicframework.com/docs/components/#navigation for more info on
11
- * Ionic pages and navigation.
12
- */
5
+import { DestinationService } from '../../services/destination-service/destination-service';
13 6
 
14 7
 @IonicPage()
15 8
 @Component({
@@ -23,7 +16,7 @@ export class MapPage {
23 16
 
24 17
   constructor(public navCtrl: NavController, 
25 18
     public navParams: NavParams,
26
-    public destinationApiProvider: DestinationsApiProvider,
19
+    public destinationService: DestinationService,
27 20
     public loadingController: LoadingController) {
28 21
   }
29 22
 
@@ -45,19 +38,16 @@ export class MapPage {
45 38
   }
46 39
 
47 40
   getAllDestinations() {
48
-    this.destinationApiProvider.getAllDestinations().subscribe(destinations => {
49
-      this.destinations = destinations.json();
50
-    })
51
-  }
52
-
53
-  getDestinationById() {
54
-    let selectedDestination = this.navParams.data;
55
-    this.destinationApiProvider.getDestinationById(selectedDestination.id).subscribe(data => {
56
-      this.destination = data.destination;
41
+    this.destinationService.getAllDestinations().subscribe(destinations => this.destinations = destinations,
42
+      err => {
43
+      console.log(err);
57 44
     })
58 45
   }
59 46
 
60 47
   goToAddDestination() {
61 48
     this.navCtrl.push(AddDestinationPage);
62 49
   }
50
+
51
+  
52
+
63 53
 }

+ 36
- 12
src/pages/signup/signup.html View File

@@ -1,21 +1,45 @@
1
-<!--
2
-  Generated template for the SignupPage 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>
10
-    <ion-title>signup</ion-title>
4
+    <ion-title>Sign Up</ion-title>
11 5
   </ion-navbar>
12 6
 
13 7
 </ion-header>
14 8
 
15 9
 
16 10
 <ion-content padding>
17
-  <ion-input placeholder="Email" type="text" required #email></ion-input>
18
-  <ion-input placeholder="Password" type="text" required #password></ion-input>
19
-  <ion-input placeholder="First Name" type="text" #firstName></ion-input>
20
-  <ion-input placeholder="Last Name" type="text" #lastName></ion-input>
21
-</ion-content>
11
+  <form [formGroup]="signupForm">
12
+    <ion-item>
13
+      <ion-label stacked>Username</ion-label>
14
+      <ion-input formControlName="userName" type="text" placeholder="Username" required #userName></ion-input>
15
+    </ion-item>
16
+  
17
+    <ion-item>
18
+      <ion-label stacked>First name</ion-label>
19
+      <ion-input placeholder="First Name" type="text" required #firstName></ion-input>
20
+    </ion-item>
21
+
22
+    <ion-item>
23
+      <ion-label stacked>Last name</ion-label>
24
+      <ion-input placeholder="Last Name" type="text" required #lastName></ion-input>
25
+    </ion-item>
26
+
27
+    <ion-item>
28
+      <ion-label stacked>E-mail</ion-label>
29
+      <ion-input placeholder="Email" type="text" required #email></ion-input>
30
+    </ion-item>
31
+
32
+    <ion-item>
33
+      <ion-label stacked>Password</ion-label>
34
+      <ion-input placeholder="Password" type="text" required #password></ion-input>
35
+    </ion-item>
36
+
37
+    <ion-item>
38
+      <ion-label stacked>Re-enter password</ion-label>
39
+      <ion-input placeholder="Re-enter Password" type="text" required #passwordreentry></ion-input>
40
+    </ion-item>
41
+
42
+    <button ion-button full color="primary" style="margin-top: 20px;" 
43
+    type="submit" [disabled]="!destinationForm.valid" (click)=createDestination()>Add</button>
44
+  </form>
45
+</ion-content>

+ 0
- 34
src/providers/destinations-api/destinations-api.ts View File

@@ -1,34 +0,0 @@
1
-import { HttpClient } from '@angular/common/http';
2
-import { Http } from '@angular/http'
3
-import { Injectable } from '@angular/core';
4
-import { Observable } from 'rxjs';
5
-
6
-/*
7
-  Generated class for the DestinationsApiProvider provider.
8
-
9
-  See https://angular.io/guide/dependency-injection for more info on providers
10
-  and Angular DI.
11
-*/
12
-@Injectable()
13
-export class DestinationsApiProvider {
14
-  private destinationUrl = "http://localhost:9090/api/v1/destinations"
15
-
16
-  constructor(private http: Http) {
17
-  }
18
-
19
-  getAllDestinations() {
20
-    return this.http.get(this.destinationUrl);
21
-  }
22
-
23
-  getDestinationById(destinationId) : Observable<any> {
24
-    return this.http.get(`this.destinationUrl/${destinationId}`)
25
-      .map(response => {
26
-        return response.json();
27
-      })
28
-  }
29
-
30
-  // createDestination(destination: Destination): Observable<Destination> {
31
-  //   return this.http.post<Destination>(this.destinationUrl, )
32
-  // }
33
-
34
-}

+ 60
- 0
src/services/destination-service/destination-service.ts View File

@@ -0,0 +1,60 @@
1
+import { Http, Response, Headers, RequestOptions } from '@angular/http'
2
+import { Injectable } from '@angular/core';
3
+import { Observable } from 'rxjs';
4
+import { Destination } from '../../model/destination-model';
5
+
6
+import 'rxjs/add/operator/map';
7
+import 'rxjs/add/operator/catch';
8
+
9
+/*
10
+  Generated class for the DestinationsApiProvider provider.
11
+
12
+  See https://angular.io/guide/dependency-injection for more info on providers
13
+  and Angular DI.
14
+*/
15
+@Injectable()
16
+export class DestinationService {
17
+  
18
+  private destinationUrl = "http://localhost:9090/api/v1/destinations"
19
+
20
+  constructor(private http: Http) {
21
+  }
22
+
23
+  //CREATE
24
+  createDestination(body: Object): Observable<Destination> {
25
+    let bodyString = JSON.stringify(body);
26
+    let headers = new Headers({ 'Content-Type' : 'application/json' });
27
+    let options = new RequestOptions({ headers: headers });
28
+    return this.http.post(this.destinationUrl, bodyString, options).map((res:Response) => res.json())
29
+    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
30
+  }
31
+
32
+  //READ
33
+  getAllDestinations() : Observable<Destination[]> {
34
+    return this.http.get(this.destinationUrl).map((res:Response) => res.json())
35
+    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
36
+  }
37
+
38
+  getDestinationById(destinationId) : Observable<Destination> {
39
+    return this.http.get(`this.destinationUrl/${destinationId}`)
40
+      .map(response => {
41
+        return response.json();
42
+      })
43
+  }
44
+
45
+  //UPDATE
46
+  updateDestination(body: Object): Observable<Destination> {
47
+    let bodyString = JSON.stringify(body);
48
+    let headers = new Headers({ 'Content-Type' : 'application/json' });
49
+    let options = new RequestOptions({ headers: headers });
50
+    return this.http.put(`${this.destinationUrl}/${body['id']}`, body, options).map((res:Response) => res.json())
51
+    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
52
+  }
53
+
54
+  //DELETE
55
+  deleteDestination(id:string): Observable<Destination> {
56
+    return this.http.delete(`${this.destinationUrl}/${id}`).map((res:Response) => res.json())
57
+    .catch((error:any) => Observable.throw(error.json().error || 'Server error'));
58
+  }
59
+
60
+}

+ 4
- 4
www/build/0.js View File

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([0],{
2 2
 
3
-/***/ 280:
3
+/***/ 684:
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7 7
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignupPageModule", function() { return SignupPageModule; });
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
10
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__signup__ = __webpack_require__(105);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__signup__ = __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);

+ 4
- 4
www/build/1.js View File

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([1],{
2 2
 
3
-/***/ 281:
3
+/***/ 683:
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7 7
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProfilePageModule", function() { return ProfilePageModule; });
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
10
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile__ = __webpack_require__(102);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile__ = __webpack_require__(152);
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);

+ 6
- 6
www/build/2.js View File

@@ -1,15 +1,15 @@
1 1
 webpackJsonp([2],{
2 2
 
3
-/***/ 279:
3
+/***/ 681:
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7 7
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapPageModule", function() { return MapPageModule; });
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
10
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map__ = __webpack_require__(103);
12
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__ = __webpack_require__(104);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map__ = __webpack_require__(86);
12
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__ = __webpack_require__(85);
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);
@@ -29,7 +29,7 @@ var MapPageModule = /** @class */ (function () {
29 29
                 __WEBPACK_IMPORTED_MODULE_2__map__["a" /* MapPage */],
30 30
             ],
31 31
             imports: [
32
-                __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */],
32
+                __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__["a" /* DestinationService */],
33 33
                 __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__map__["a" /* MapPage */]),
34 34
             ],
35 35
         })

+ 1
- 1
www/build/2.js.map View File

@@ -1 +1 @@
1
-{"version":3,"sources":["../../src/pages/map/map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAyC;AACO;AAChB;AAC4D;AAW5F;IAAA;IAA4B,CAAC;IAAhB,aAAa;QATzB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,qDAAO;aACR;YACD,OAAO,EAAE;gBACP,6GAAuB;gBACvB,sEAAe,CAAC,QAAQ,CAAC,qDAAO,CAAC;aAClC;SACF,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAAA;AAAH","file":"2.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { MapPage } from './map';\nimport { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';\n\n@NgModule({\n  declarations: [\n    MapPage,\n  ],\n  imports: [\n    DestinationsApiProvider,\n    IonicPageModule.forChild(MapPage),\n  ],\n})\nexport class MapPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/map/map.module.ts"],"sourceRoot":""}
1
+{"version":3,"sources":["../../src/pages/map/map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAyC;AACO;AAChB;AAC4D;AAW5F;IAAA;IAA4B,CAAC;IAAhB,aAAa;QATzB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,qDAAO;aACR;YACD,OAAO,EAAE;gBACP,6GAAkB;gBAClB,sEAAe,CAAC,QAAQ,CAAC,qDAAO,CAAC;aAClC;SACF,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAAA;AAAH","file":"2.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { MapPage } from './map';\nimport { DestinationService } from '../../services/destination-service/destination-service';\n\n@NgModule({\n  declarations: [\n    MapPage,\n  ],\n  imports: [\n    DestinationService,\n    IonicPageModule.forChild(MapPage),\n  ],\n})\nexport class MapPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/map/map.module.ts"],"sourceRoot":""}

+ 4
- 4
www/build/3.js View File

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([3],{
2 2
 
3
-/***/ 278:
3
+/***/ 682:
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7 7
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginPageModule", function() { return LoginPageModule; });
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
10
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login__ = __webpack_require__(101);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
10
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login__ = __webpack_require__(151);
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);

+ 4
- 4
www/build/4.js View File

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([4],{
2 2
 
3
-/***/ 277:
3
+/***/ 680:
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7 7
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DestinationDetailsPageModule", function() { return DestinationDetailsPageModule; });
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
10
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details__ = __webpack_require__(100);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
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__(150);
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);

+ 6
- 6
www/build/5.js View File

@@ -1,15 +1,15 @@
1 1
 webpackJsonp([5],{
2 2
 
3
-/***/ 276:
3
+/***/ 679:
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7 7
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
8 8
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AddDestinationPageModule", function() { return AddDestinationPageModule; });
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
10
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__add_destination__ = __webpack_require__(99);
12
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__ = __webpack_require__(104);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
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__(149);
12
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__ = __webpack_require__(85);
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);
@@ -29,7 +29,7 @@ var AddDestinationPageModule = /** @class */ (function () {
29 29
                 __WEBPACK_IMPORTED_MODULE_2__add_destination__["a" /* AddDestinationPage */],
30 30
             ],
31 31
             imports: [
32
-                __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */],
32
+                __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__["a" /* DestinationService */],
33 33
                 __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__add_destination__["a" /* AddDestinationPage */]),
34 34
             ],
35 35
         })

+ 1
- 1
www/build/5.js.map View File

@@ -1 +1 @@
1
-{"version":3,"sources":["../../src/pages/add-destination/add-destination.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAyC;AACO;AACO;AACqC;AAW5F;IAAA;IAAuC,CAAC;IAA3B,wBAAwB;QATpC,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,4EAAkB;aACnB;YACD,OAAO,EAAE;gBACP,6GAAuB;gBACvB,sEAAe,CAAC,QAAQ,CAAC,4EAAkB,CAAC;aAC7C;SACF,CAAC;OACW,wBAAwB,CAAG;IAAD,+BAAC;CAAA;AAAH","file":"5.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { AddDestinationPage } from './add-destination';\nimport { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';\n\n@NgModule({\n  declarations: [\n    AddDestinationPage,\n  ],\n  imports: [\n    DestinationsApiProvider,\n    IonicPageModule.forChild(AddDestinationPage),\n  ],\n})\nexport class AddDestinationPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/add-destination/add-destination.module.ts"],"sourceRoot":""}
1
+{"version":3,"sources":["../../src/pages/add-destination/add-destination.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAyC;AACO;AACO;AACqC;AAW5F;IAAA;IAAuC,CAAC;IAA3B,wBAAwB;QATpC,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,4EAAkB;aACnB;YACD,OAAO,EAAE;gBACP,6GAAkB;gBAClB,sEAAe,CAAC,QAAQ,CAAC,4EAAkB,CAAC;aAC7C;SACF,CAAC;OACW,wBAAwB,CAAG;IAAD,+BAAC;CAAA;AAAH","file":"5.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { IonicPageModule } from 'ionic-angular';\nimport { AddDestinationPage } from './add-destination';\nimport { DestinationService } from '../../services/destination-service/destination-service';\n\n@NgModule({\n  declarations: [\n    AddDestinationPage,\n  ],\n  imports: [\n    DestinationService,\n    IonicPageModule.forChild(AddDestinationPage),\n  ],\n})\nexport class AddDestinationPageModule {}\n\n\n\n// WEBPACK FOOTER //\n// ./src/pages/add-destination/add-destination.module.ts"],"sourceRoot":""}

+ 266
- 227
www/build/main.js View File

@@ -1,12 +1,90 @@
1 1
 webpackJsonp([6],{
2 2
 
3
-/***/ 100:
3
+/***/ 149:
4
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
5
+
6
+"use strict";
7
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AddDestinationPage; });
8
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
9
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
10
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__(25);
11
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__ = __webpack_require__(85);
12
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map_map__ = __webpack_require__(86);
13
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
14
+    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15
+    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16
+    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
17
+    return c > 3 && r && Object.defineProperty(target, key, r), r;
18
+};
19
+var __metadata = (this && this.__metadata) || function (k, v) {
20
+    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
21
+};
22
+
23
+
24
+
25
+
26
+
27
+/**
28
+ * Generated class for the AddDestinationPage page.
29
+ *
30
+ * See https://ionicframework.com/docs/components/#navigation for more info on
31
+ * Ionic pages and navigation.
32
+ */
33
+var AddDestinationPage = /** @class */ (function () {
34
+    function AddDestinationPage(navCtrl, navParams, formBuilder, destinationService) {
35
+        this.navCtrl = navCtrl;
36
+        this.navParams = navParams;
37
+        this.formBuilder = formBuilder;
38
+        this.destinationService = destinationService;
39
+        this.profile = {
40
+            id: 1,
41
+            userName: "JohnDoe",
42
+            homeCity: "",
43
+            homeCountry: "",
44
+            description: "",
45
+            imagePath: "",
46
+            friendList: null,
47
+            user: null
48
+        };
49
+        this.destinationForm = this.formBuilder.group({
50
+            destinationState: ['', __WEBPACK_IMPORTED_MODULE_2__angular_forms__["f" /* Validators */].required],
51
+            city: ['', __WEBPACK_IMPORTED_MODULE_2__angular_forms__["f" /* Validators */].required],
52
+            country: ['', __WEBPACK_IMPORTED_MODULE_2__angular_forms__["f" /* Validators */].required]
53
+        });
54
+    }
55
+    AddDestinationPage.prototype.ionViewDidLoad = function () {
56
+        console.log('ionViewDidLoad AddDestinationPage');
57
+    };
58
+    AddDestinationPage.prototype.createDestination = function () {
59
+        var _this = this;
60
+        this.destination = this.destinationForm.value;
61
+        this.destination.profile = this.profile;
62
+        this.destinationService.createDestination(this.destination).subscribe(function (data) { return _this.destination = data; }, function (err) {
63
+            console.log(err);
64
+        });
65
+        this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_4__map_map__["a" /* MapPage */]);
66
+    };
67
+    AddDestinationPage = __decorate([
68
+        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
69
+            selector: 'page-add-destination',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/add-destination/add-destination.html"*/'<ion-header>\n\n  <ion-navbar>\n    <ion-title>Add Destination</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <form [formGroup]="destinationForm">\n        <ion-list radio-group formControlName="destinationState">\n            <ion-item>\n              <ion-label>Want to go</ion-label>\n              <ion-radio value="future"></ion-radio>\n            </ion-item>\n            <ion-item>\n              <ion-label>Have been to</ion-label>\n              <ion-radio value="past"></ion-radio>\n            </ion-item>\n        </ion-list>\n\n    <ion-item>\n      <ion-label stacked>City</ion-label>\n      <ion-input formControlName="city" type="text"></ion-input>\n    </ion-item>\n\n    <ion-item>\n      <ion-label stacked>Country</ion-label>\n      <ion-input formControlName="country" type="text"></ion-input>\n    </ion-item>\n\n    <button ion-button full color="primary" style="margin-top: 20px;" \n    type="submit" [disabled]="!destinationForm.valid" (click)=createDestination()>Add</button>\n\n  </form>\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/add-destination/add-destination.html"*/,
70
+        }),
71
+        __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_2__angular_forms__["a" /* FormBuilder */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_2__angular_forms__["a" /* FormBuilder */]) === "function" && _c || Object, typeof (_d = typeof __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__["a" /* DestinationService */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_3__services_destination_service_destination_service__["a" /* DestinationService */]) === "function" && _d || Object])
72
+    ], AddDestinationPage);
73
+    return AddDestinationPage;
74
+    var _a, _b, _c, _d;
75
+}());
76
+
77
+//# sourceMappingURL=add-destination.js.map
78
+
79
+/***/ }),
80
+
81
+/***/ 150:
4 82
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 83
 
6 84
 "use strict";
7 85
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DestinationDetailsPage; });
8
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
86
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
87
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
10 88
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11 89
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12 90
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -37,25 +115,24 @@ var DestinationDetailsPage = /** @class */ (function () {
37 115
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
38 116
             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"*/,
39 117
         }),
40
-        __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])
118
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
41 119
     ], DestinationDetailsPage);
42 120
     return DestinationDetailsPage;
43
-    var _a, _b;
44 121
 }());
45 122
 
46 123
 //# sourceMappingURL=destination-details.js.map
47 124
 
48 125
 /***/ }),
49 126
 
50
-/***/ 101:
127
+/***/ 151:
51 128
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
52 129
 
53 130
 "use strict";
54 131
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginPage; });
55
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
56
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
57
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile_profile__ = __webpack_require__(102);
58
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__signup_signup__ = __webpack_require__(105);
132
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
133
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
134
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile_profile__ = __webpack_require__(152);
135
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__signup_signup__ = __webpack_require__(153);
59 136
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
60 137
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61 138
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -85,7 +162,7 @@ var LoginPage = /** @class */ (function () {
85 162
     };
86 163
     LoginPage = __decorate([
87 164
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
88
-            selector: 'page-login',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/login/login.html"*/'<!--\n  Generated template for the LoginPage 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>Login</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <ion-input placeholder="Email" type="text" required #email></ion-input>\n  <ion-input placeholder="Password" type="text" required #password></ion-input>\n  <button ion-button (click)=goToProfile()>Login</button>\n  <button ion-button (click)=goToSignup()>Sign up</button>\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/login/login.html"*/,
165
+            selector: 'page-login',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/login/login.html"*/'<ion-header>\n\n  <ion-navbar>\n    <ion-title>Login</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <ion-input placeholder="Email" type="text" required #email></ion-input>\n  <ion-input placeholder="Password" type="text" required #password></ion-input>\n  <button ion-button (click)=goToProfile()>Login</button>\n  <button ion-button (click)=goToSignup()>Sign up</button>\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/login/login.html"*/,
89 166
         }),
90 167
         __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
91 168
     ], LoginPage);
@@ -96,14 +173,14 @@ var LoginPage = /** @class */ (function () {
96 173
 
97 174
 /***/ }),
98 175
 
99
-/***/ 102:
176
+/***/ 152:
100 177
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
101 178
 
102 179
 "use strict";
103 180
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ProfilePage; });
104
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
105
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
106
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map_map__ = __webpack_require__(103);
181
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
182
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
183
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map_map__ = __webpack_require__(86);
107 184
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
108 185
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
109 186
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -146,145 +223,13 @@ var ProfilePage = /** @class */ (function () {
146 223
 
147 224
 /***/ }),
148 225
 
149
-/***/ 103:
150
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
151
-
152
-"use strict";
153
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MapPage; });
154
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
155
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
156
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__ = __webpack_require__(100);
157
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__ = __webpack_require__(104);
158
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__add_destination_add_destination__ = __webpack_require__(99);
159
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
160
-    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
161
-    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
162
-    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
163
-    return c > 3 && r && Object.defineProperty(target, key, r), r;
164
-};
165
-var __metadata = (this && this.__metadata) || function (k, v) {
166
-    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
167
-};
168
-
169
-
170
-
171
-
172
-
173
-/**
174
- * Generated class for the MapPage page.
175
- *
176
- * See https://ionicframework.com/docs/components/#navigation for more info on
177
- * Ionic pages and navigation.
178
- */
179
-var MapPage = /** @class */ (function () {
180
-    function MapPage(navCtrl, navParams, destinationApiProvider, loadingController) {
181
-        this.navCtrl = navCtrl;
182
-        this.navParams = navParams;
183
-        this.destinationApiProvider = destinationApiProvider;
184
-        this.loadingController = loadingController;
185
-        this.destinations = [];
186
-        this.destination = {};
187
-    }
188
-    MapPage.prototype.ionViewDidLoad = function () {
189
-        var _this = this;
190
-        var loader = this.loadingController.create({
191
-            content: 'Getting destinations...'
192
-        });
193
-        loader.present().then(function () {
194
-            _this.getAllDestinations();
195
-            loader.dismiss();
196
-        });
197
-    };
198
-    MapPage.prototype.goToDestinationDetails = function ($event, destination) {
199
-        this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__["a" /* DestinationDetailsPage */], destination);
200
-    };
201
-    MapPage.prototype.getAllDestinations = function () {
202
-        var _this = this;
203
-        this.destinationApiProvider.getAllDestinations().subscribe(function (destinations) {
204
-            _this.destinations = destinations.json();
205
-        });
206
-    };
207
-    MapPage.prototype.getDestinationById = function () {
208
-        var _this = this;
209
-        var selectedDestination = this.navParams.data;
210
-        this.destinationApiProvider.getDestinationById(selectedDestination.id).subscribe(function (data) {
211
-            _this.destination = data.destination;
212
-        });
213
-    };
214
-    MapPage.prototype.goToAddDestination = function () {
215
-        this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_4__add_destination_add_destination__["a" /* AddDestinationPage */]);
216
-    };
217
-    MapPage = __decorate([
218
-        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
219
-            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  <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</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/map/map.html"*/,
220
-        }),
221
-        __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_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */]) === "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])
222
-    ], MapPage);
223
-    return MapPage;
224
-    var _a, _b, _c, _d;
225
-}());
226
-
227
-//# sourceMappingURL=map.js.map
228
-
229
-/***/ }),
230
-
231
-/***/ 104:
232
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
233
-
234
-"use strict";
235
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DestinationsApiProvider; });
236
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_http__ = __webpack_require__(157);
237
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
238
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
239
-    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
240
-    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
241
-    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
242
-    return c > 3 && r && Object.defineProperty(target, key, r), r;
243
-};
244
-var __metadata = (this && this.__metadata) || function (k, v) {
245
-    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
246
-};
247
-
248
-
249
-/*
250
-  Generated class for the DestinationsApiProvider provider.
251
-
252
-  See https://angular.io/guide/dependency-injection for more info on providers
253
-  and Angular DI.
254
-*/
255
-var DestinationsApiProvider = /** @class */ (function () {
256
-    function DestinationsApiProvider(http) {
257
-        this.http = http;
258
-        this.destinationUrl = "http://localhost:9090/api/v1/destinations";
259
-    }
260
-    DestinationsApiProvider.prototype.getAllDestinations = function () {
261
-        return this.http.get(this.destinationUrl);
262
-    };
263
-    DestinationsApiProvider.prototype.getDestinationById = function (destinationId) {
264
-        return this.http.get("this.destinationUrl/" + destinationId)
265
-            .map(function (response) {
266
-            return response.json();
267
-        });
268
-    };
269
-    DestinationsApiProvider = __decorate([
270
-        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["A" /* Injectable */])(),
271
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_0__angular_http__["a" /* Http */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_0__angular_http__["a" /* Http */]) === "function" && _a || Object])
272
-    ], DestinationsApiProvider);
273
-    return DestinationsApiProvider;
274
-    var _a;
275
-}());
276
-
277
-//# sourceMappingURL=destinations-api.js.map
278
-
279
-/***/ }),
280
-
281
-/***/ 105:
226
+/***/ 153:
282 227
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
283 228
 
284 229
 "use strict";
285 230
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SignupPage; });
286
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
287
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
231
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
232
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
288 233
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
289 234
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
290 235
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -323,7 +268,7 @@ var SignupPage = /** @class */ (function () {
323 268
 
324 269
 /***/ }),
325 270
 
326
-/***/ 115:
271
+/***/ 164:
327 272
 /***/ (function(module, exports) {
328 273
 
329 274
 function webpackEmptyAsyncContext(req) {
@@ -336,36 +281,36 @@ function webpackEmptyAsyncContext(req) {
336 281
 webpackEmptyAsyncContext.keys = function() { return []; };
337 282
 webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
338 283
 module.exports = webpackEmptyAsyncContext;
339
-webpackEmptyAsyncContext.id = 115;
284
+webpackEmptyAsyncContext.id = 164;
340 285
 
341 286
 /***/ }),
342 287
 
343
-/***/ 156:
288
+/***/ 209:
344 289
 /***/ (function(module, exports, __webpack_require__) {
345 290
 
346 291
 var map = {
347 292
 	"../pages/add-destination/add-destination.module": [
348
-		276,
293
+		679,
349 294
 		5
350 295
 	],
351 296
 	"../pages/destination-details/destination-details.module": [
352
-		277,
297
+		680,
353 298
 		4
354 299
 	],
355 300
 	"../pages/login/login.module": [
356
-		278,
301
+		682,
357 302
 		3
358 303
 	],
359 304
 	"../pages/map/map.module": [
360
-		279,
305
+		681,
361 306
 		2
362 307
 	],
363 308
 	"../pages/profile/profile.module": [
364
-		281,
309
+		683,
365 310
 		1
366 311
 	],
367 312
 	"../pages/signup/signup.module": [
368
-		280,
313
+		684,
369 314
 		0
370 315
 	]
371 316
 };
@@ -380,19 +325,19 @@ function webpackAsyncContext(req) {
380 325
 webpackAsyncContext.keys = function webpackAsyncContextKeys() {
381 326
 	return Object.keys(map);
382 327
 };
383
-webpackAsyncContext.id = 156;
328
+webpackAsyncContext.id = 209;
384 329
 module.exports = webpackAsyncContext;
385 330
 
386 331
 /***/ }),
387 332
 
388
-/***/ 201:
333
+/***/ 349:
389 334
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
390 335
 
391 336
 "use strict";
392 337
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HomePage; });
393
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
394
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
395
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login_login__ = __webpack_require__(101);
338
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
339
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
340
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login_login__ = __webpack_require__(151);
396 341
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
397 342
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
398 343
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -425,13 +370,13 @@ var HomePage = /** @class */ (function () {
425 370
 
426 371
 /***/ }),
427 372
 
428
-/***/ 202:
373
+/***/ 350:
429 374
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
430 375
 
431 376
 "use strict";
432 377
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
433
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(203);
434
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(225);
378
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(351);
379
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(355);
435 380
 
436 381
 
437 382
 Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_1__app_module__["a" /* AppModule */]);
@@ -439,26 +384,26 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
439 384
 
440 385
 /***/ }),
441 386
 
442
-/***/ 225:
387
+/***/ 355:
443 388
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
444 389
 
445 390
 "use strict";
446 391
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
447
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(27);
448
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
449
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(18);
450
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(197);
451
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__ = __webpack_require__(200);
452
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_http__ = __webpack_require__(157);
453
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__app_component__ = __webpack_require__(275);
454
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__pages_home_home__ = __webpack_require__(201);
455
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pages_login_login__ = __webpack_require__(101);
456
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__ = __webpack_require__(105);
457
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__ = __webpack_require__(102);
458
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pages_map_map__ = __webpack_require__(103);
459
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__ = __webpack_require__(100);
460
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__providers_destinations_api_destinations_api__ = __webpack_require__(104);
461
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__pages_add_destination_add_destination__ = __webpack_require__(99);
392
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(40);
393
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
394
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(29);
395
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(345);
396
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__ = __webpack_require__(348);
397
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__angular_http__ = __webpack_require__(210);
398
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__app_component__ = __webpack_require__(678);
399
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__pages_home_home__ = __webpack_require__(349);
400
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pages_login_login__ = __webpack_require__(151);
401
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__ = __webpack_require__(153);
402
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__ = __webpack_require__(152);
403
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pages_map_map__ = __webpack_require__(86);
404
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__ = __webpack_require__(150);
405
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__pages_add_destination_add_destination__ = __webpack_require__(149);
406
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__services_destination_service_destination_service__ = __webpack_require__(85);
462 407
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
463 408
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
464 409
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -497,20 +442,20 @@ var AppModule = /** @class */ (function () {
497 442
                 __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__["a" /* SignupPage */],
498 443
                 __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__["a" /* ProfilePage */],
499 444
                 __WEBPACK_IMPORTED_MODULE_11__pages_map_map__["a" /* MapPage */],
500
-                __WEBPACK_IMPORTED_MODULE_14__pages_add_destination_add_destination__["a" /* AddDestinationPage */],
445
+                __WEBPACK_IMPORTED_MODULE_13__pages_add_destination_add_destination__["a" /* AddDestinationPage */],
501 446
                 __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__["a" /* DestinationDetailsPage */]
502 447
             ],
503 448
             imports: [
504 449
                 __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */],
505
-                __WEBPACK_IMPORTED_MODULE_5__angular_http__["b" /* HttpModule */],
450
+                __WEBPACK_IMPORTED_MODULE_5__angular_http__["c" /* HttpModule */],
506 451
                 __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["c" /* IonicModule */].forRoot(__WEBPACK_IMPORTED_MODULE_6__app_component__["a" /* MyApp */], {}, {
507 452
                     links: [
508 453
                         { loadChildren: '../pages/add-destination/add-destination.module#AddDestinationPageModule', name: 'AddDestinationPage', segment: 'add-destination', priority: 'low', defaultHistory: [] },
509 454
                         { loadChildren: '../pages/destination-details/destination-details.module#DestinationDetailsPageModule', name: 'DestinationDetailsPage', segment: 'destination-details', priority: 'low', defaultHistory: [] },
510
-                        { loadChildren: '../pages/login/login.module#LoginPageModule', name: 'LoginPage', segment: 'login', priority: 'low', defaultHistory: [] },
511 455
                         { loadChildren: '../pages/map/map.module#MapPageModule', name: 'MapPage', segment: 'map', priority: 'low', defaultHistory: [] },
512
-                        { loadChildren: '../pages/signup/signup.module#SignupPageModule', name: 'SignupPage', segment: 'signup', priority: 'low', defaultHistory: [] },
513
-                        { loadChildren: '../pages/profile/profile.module#ProfilePageModule', name: 'ProfilePage', segment: 'profile', priority: 'low', defaultHistory: [] }
456
+                        { loadChildren: '../pages/login/login.module#LoginPageModule', name: 'LoginPage', segment: 'login', priority: 'low', defaultHistory: [] },
457
+                        { loadChildren: '../pages/profile/profile.module#ProfilePageModule', name: 'ProfilePage', segment: 'profile', priority: 'low', defaultHistory: [] },
458
+                        { loadChildren: '../pages/signup/signup.module#SignupPageModule', name: 'SignupPage', segment: 'signup', priority: 'low', defaultHistory: [] }
514 459
                     ]
515 460
                 })
516 461
             ],
@@ -522,14 +467,14 @@ var AppModule = /** @class */ (function () {
522 467
                 __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__["a" /* SignupPage */],
523 468
                 __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__["a" /* ProfilePage */],
524 469
                 __WEBPACK_IMPORTED_MODULE_11__pages_map_map__["a" /* MapPage */],
525
-                __WEBPACK_IMPORTED_MODULE_14__pages_add_destination_add_destination__["a" /* AddDestinationPage */],
470
+                __WEBPACK_IMPORTED_MODULE_13__pages_add_destination_add_destination__["a" /* AddDestinationPage */],
526 471
                 __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__["a" /* DestinationDetailsPage */]
527 472
             ],
528 473
             providers: [
529 474
                 __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__["a" /* StatusBar */],
530 475
                 __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */],
476
+                __WEBPACK_IMPORTED_MODULE_14__services_destination_service_destination_service__["a" /* DestinationService */],
531 477
                 { provide: __WEBPACK_IMPORTED_MODULE_1__angular_core__["u" /* ErrorHandler */], useClass: __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["b" /* IonicErrorHandler */] },
532
-                __WEBPACK_IMPORTED_MODULE_13__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */]
533 478
             ]
534 479
         })
535 480
     ], AppModule);
@@ -540,16 +485,16 @@ var AppModule = /** @class */ (function () {
540 485
 
541 486
 /***/ }),
542 487
 
543
-/***/ 275:
488
+/***/ 678:
544 489
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
545 490
 
546 491
 "use strict";
547 492
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MyApp; });
548
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
549
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
550
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(200);
551
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(197);
552
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(201);
493
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
494
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
495
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(348);
496
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(345);
497
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(349);
553 498
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
554 499
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
555 500
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -586,15 +531,19 @@ var MyApp = /** @class */ (function () {
586 531
 
587 532
 /***/ }),
588 533
 
589
-/***/ 99:
534
+/***/ 85:
590 535
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
591 536
 
592 537
 "use strict";
593
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AddDestinationPage; });
594
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
595
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
596
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__(15);
597
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__ = __webpack_require__(104);
538
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DestinationService; });
539
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_http__ = __webpack_require__(210);
540
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
541
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs__ = __webpack_require__(375);
542
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_rxjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_rxjs__);
543
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs_add_operator_map__ = __webpack_require__(251);
544
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs_add_operator_map___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_rxjs_add_operator_map__);
545
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_catch__ = __webpack_require__(224);
546
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_catch___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_rxjs_add_operator_catch__);
598 547
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
599 548
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
600 549
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -608,41 +557,131 @@ var __metadata = (this && this.__metadata) || function (k, v) {
608 557
 
609 558
 
610 559
 
611
-/**
612
- * Generated class for the AddDestinationPage page.
613
- *
614
- * See https://ionicframework.com/docs/components/#navigation for more info on
615
- * Ionic pages and navigation.
616
- */
617
-var AddDestinationPage = /** @class */ (function () {
618
-    function AddDestinationPage(navCtrl, navParams, formBuilder, destinationApiProvider) {
560
+
561
+/*
562
+  Generated class for the DestinationsApiProvider provider.
563
+
564
+  See https://angular.io/guide/dependency-injection for more info on providers
565
+  and Angular DI.
566
+*/
567
+var DestinationService = /** @class */ (function () {
568
+    function DestinationService(http) {
569
+        this.http = http;
570
+        this.destinationUrl = "http://localhost:9090/api/v1/destinations";
571
+    }
572
+    //CREATE
573
+    DestinationService.prototype.createDestination = function (body) {
574
+        var bodyString = JSON.stringify(body);
575
+        var headers = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["a" /* Headers */]({ 'Content-Type': 'application/json' });
576
+        var options = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["d" /* RequestOptions */]({ headers: headers });
577
+        return this.http.post(this.destinationUrl, bodyString, options).map(function (res) { return res.json(); })
578
+            .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
579
+    };
580
+    //READ
581
+    DestinationService.prototype.getAllDestinations = function () {
582
+        return this.http.get(this.destinationUrl).map(function (res) { return res.json(); })
583
+            .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
584
+    };
585
+    DestinationService.prototype.getDestinationById = function (destinationId) {
586
+        return this.http.get("this.destinationUrl/" + destinationId)
587
+            .map(function (response) {
588
+            return response.json();
589
+        });
590
+    };
591
+    //UPDATE
592
+    DestinationService.prototype.updateDestination = function (body) {
593
+        var bodyString = JSON.stringify(body);
594
+        var headers = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["a" /* Headers */]({ 'Content-Type': 'application/json' });
595
+        var options = new __WEBPACK_IMPORTED_MODULE_0__angular_http__["d" /* RequestOptions */]({ headers: headers });
596
+        return this.http.put(this.destinationUrl + "/" + body['id'], body, options).map(function (res) { return res.json(); })
597
+            .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
598
+    };
599
+    //DELETE
600
+    DestinationService.prototype.deleteDestination = function (id) {
601
+        return this.http.delete(this.destinationUrl + "/" + id).map(function (res) { return res.json(); })
602
+            .catch(function (error) { return __WEBPACK_IMPORTED_MODULE_2_rxjs__["Observable"].throw(error.json().error || 'Server error'); });
603
+    };
604
+    DestinationService = __decorate([
605
+        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["A" /* Injectable */])(),
606
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_http__["b" /* Http */]])
607
+    ], DestinationService);
608
+    return DestinationService;
609
+}());
610
+
611
+//# sourceMappingURL=destination-service.js.map
612
+
613
+/***/ }),
614
+
615
+/***/ 86:
616
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
617
+
618
+"use strict";
619
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MapPage; });
620
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
621
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(29);
622
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__ = __webpack_require__(150);
623
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__add_destination_add_destination__ = __webpack_require__(149);
624
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__services_destination_service_destination_service__ = __webpack_require__(85);
625
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
626
+    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
627
+    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
628
+    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
629
+    return c > 3 && r && Object.defineProperty(target, key, r), r;
630
+};
631
+var __metadata = (this && this.__metadata) || function (k, v) {
632
+    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
633
+};
634
+
635
+
636
+
637
+
638
+
639
+var MapPage = /** @class */ (function () {
640
+    function MapPage(navCtrl, navParams, destinationService, loadingController) {
619 641
         this.navCtrl = navCtrl;
620 642
         this.navParams = navParams;
621
-        this.formBuilder = formBuilder;
622
-        this.destinationApiProvider = destinationApiProvider;
623
-        this.destinationForm = this.formBuilder.group({
624
-            city: [''],
625
-            country: ['']
626
-        });
643
+        this.destinationService = destinationService;
644
+        this.loadingController = loadingController;
645
+        this.destinations = [];
646
+        this.destination = {};
627 647
     }
628
-    AddDestinationPage.prototype.ionViewDidLoad = function () {
629
-        console.log('ionViewDidLoad AddDestinationPage');
648
+    MapPage.prototype.ionViewDidLoad = function () {
649
+        var _this = this;
650
+        var loader = this.loadingController.create({
651
+            content: 'Getting destinations...'
652
+        });
653
+        loader.present().then(function () {
654
+            _this.getAllDestinations();
655
+            loader.dismiss();
656
+        });
630 657
     };
631
-    AddDestinationPage.prototype.createDestination = function () {
658
+    MapPage.prototype.goToDestinationDetails = function ($event, destination) {
659
+        this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__["a" /* DestinationDetailsPage */], destination);
632 660
     };
633
-    AddDestinationPage = __decorate([
661
+    MapPage.prototype.getAllDestinations = function () {
662
+        var _this = this;
663
+        this.destinationService.getAllDestinations().subscribe(function (destinations) { return _this.destinations = destinations; }, function (err) {
664
+            console.log(err);
665
+        });
666
+    };
667
+    MapPage.prototype.goToAddDestination = function () {
668
+        this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_3__add_destination_add_destination__["a" /* AddDestinationPage */]);
669
+    };
670
+    MapPage = __decorate([
634 671
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
635
-            selector: 'page-add-destination',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/add-destination/add-destination.html"*/'<!--\n  Generated template for the AddDestinationPage 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>Add Destination</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <form [formGroup]="destinationForm">\n      <ion-item>\n          <ion-label floating>City</ion-label>\n          <ion-input [formControl]="destinationForm.controls[\'city\']" type="text"></ion-input>\n      </ion-item>\n\n      <ion-item>\n          <ion-label floating>Country</ion-label>\n          <ion-input [formControl]="destinationForm.controls[\'country\']" type="text"></ion-input>\n      </ion-item>\n\n      <button ion-button full color="primary" style="margin-top: 20px;" \n      type="submit" [disabled]="!destinationForm.valid" (click)=createDestination()>Create</button>        \n  </form>\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/add-destination/add-destination.html"*/,
672
+            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  <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</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/map/map.html"*/,
636 673
         }),
637
-        __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_2__angular_forms__["a" /* FormBuilder */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_2__angular_forms__["a" /* FormBuilder */]) === "function" && _c || Object, typeof (_d = typeof __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */]) === "function" && _d || Object])
638
-    ], AddDestinationPage);
639
-    return AddDestinationPage;
640
-    var _a, _b, _c, _d;
674
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */],
675
+            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */],
676
+            __WEBPACK_IMPORTED_MODULE_4__services_destination_service_destination_service__["a" /* DestinationService */],
677
+            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* LoadingController */]])
678
+    ], MapPage);
679
+    return MapPage;
641 680
 }());
642 681
 
643
-//# sourceMappingURL=add-destination.js.map
682
+//# sourceMappingURL=map.js.map
644 683
 
645 684
 /***/ })
646 685
 
647
-},[202]);
686
+},[350]);
648 687
 //# sourceMappingURL=main.js.map

+ 1
- 1
www/build/main.js.map
File diff suppressed because it is too large
View File


+ 74860
- 52919
www/build/vendor.js
File diff suppressed because it is too large
View File


+ 1
- 1
www/build/vendor.js.map
File diff suppressed because it is too large
View File