Eric Foster 6 jaren geleden
bovenliggende
commit
4c7e69d6d8

+ 1
- 1
.sourcemaps/2.js.map Bestand weergeven

@@ -1 +1 @@
1
-{"version":3,"sources":["../../src/pages/map/map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAyC;AACO;AAChB;AAUhC;IAAA;IAA4B,CAAC;IAAhB,aAAa;QARzB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,qDAAO;aACR;YACD,OAAO,EAAE;gBACP,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';\n\n@NgModule({\n  declarations: [\n    MapPage,\n  ],\n  imports: [\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,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
- 0
.sourcemaps/5.js.map Bestand weergeven

@@ -0,0 +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
- 1
.sourcemaps/main.js.map
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 3
- 0
src/app/app.module.ts Bestand weergeven

@@ -15,6 +15,7 @@ import { ProfilePage } from '../pages/profile/profile';
15 15
 import { MapPage } from '../pages/map/map';
16 16
 import { DestinationDetailsPage } from '../pages/destination-details/destination-details';
17 17
 import { DestinationsApiProvider } from '../providers/destinations-api/destinations-api';
18
+import { AddDestinationPage } from '../pages/add-destination/add-destination';
18 19
 
19 20
 const config = {
20 21
   issuer: 'https://dev-270119.oktapreview.com/oauth2/default',
@@ -30,6 +31,7 @@ const config = {
30 31
     SignupPage,
31 32
     ProfilePage,
32 33
     MapPage,
34
+    AddDestinationPage,
33 35
     DestinationDetailsPage
34 36
   ],
35 37
   imports: [
@@ -45,6 +47,7 @@ const config = {
45 47
     SignupPage,
46 48
     ProfilePage,
47 49
     MapPage,
50
+    AddDestinationPage,
48 51
     DestinationDetailsPage
49 52
   ],
50 53
   providers: [

+ 31
- 0
src/pages/add-destination/add-destination.html Bestand weergeven

@@ -0,0 +1,31 @@
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
+<ion-header>
8
+
9
+  <ion-navbar>
10
+    <ion-title>Add Destination</ion-title>
11
+  </ion-navbar>
12
+
13
+</ion-header>
14
+
15
+
16
+<ion-content padding>
17
+  <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>        
30
+  </form>
31
+</ion-content>

+ 15
- 0
src/pages/add-destination/add-destination.module.ts Bestand weergeven

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

+ 3
- 0
src/pages/add-destination/add-destination.scss Bestand weergeven

@@ -0,0 +1,3 @@
1
+page-add-destination {
2
+
3
+}

+ 38
- 0
src/pages/add-destination/add-destination.ts Bestand weergeven

@@ -0,0 +1,38 @@
1
+import { Component } from '@angular/core';
2
+import { IonicPage, NavController, NavParams } from 'ionic-angular';
3
+import { FormBuilder, FormGroup } from '@angular/forms';
4
+import { DestinationsApiProvider } from '../../providers/destinations-api/destinations-api';
5
+
6
+/**
7
+ * Generated class for the AddDestinationPage page.
8
+ *
9
+ * See https://ionicframework.com/docs/components/#navigation for more info on
10
+ * Ionic pages and navigation.
11
+ */
12
+
13
+@IonicPage()
14
+@Component({
15
+  selector: 'page-add-destination',
16
+  templateUrl: 'add-destination.html',
17
+})
18
+export class AddDestinationPage {
19
+
20
+  destinationForm: FormGroup;
21
+
22
+  constructor(public navCtrl: NavController, public navParams: NavParams, 
23
+    private formBuilder: FormBuilder, public destinationApiProvider: DestinationsApiProvider) {
24
+    this.destinationForm = this.formBuilder.group({
25
+      city: [''],
26
+      country: ['']
27
+    });
28
+  }
29
+
30
+  ionViewDidLoad() {
31
+    console.log('ionViewDidLoad AddDestinationPage');
32
+  }
33
+
34
+  createDestination() {
35
+
36
+  }
37
+
38
+}

+ 2
- 4
src/pages/destination-details/destination-details.ts Bestand weergeven

@@ -17,12 +17,10 @@ export class DestinationDetailsPage {
17 17
 
18 18
   public destination: any = {};
19 19
 
20
-  constructor(public navCtrl: NavController, public navParams: NavParams) {
21
-    this.destination = this.navParams.data;
22
-  }
20
+  constructor(public navCtrl: NavController, public navParams: NavParams) { }
23 21
 
24 22
   ionViewDidLoad() {
25
-    console.log('ionViewDidLoad DestinationDetailsPage');
23
+    this.destination = this.navParams.data;
26 24
   }
27 25
 
28 26
 }

+ 1
- 0
src/pages/map/map.html Bestand weergeven

@@ -23,4 +23,5 @@
23 23
       </ion-item>
24 24
     </ion-item-sliding>
25 25
   </ion-list>
26
+  <button ion-button (click)=goToAddDestination()>Add Destination</button>
26 27
 </ion-content>

+ 2
- 0
src/pages/map/map.module.ts Bestand weergeven

@@ -1,12 +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 5
 
5 6
 @NgModule({
6 7
   declarations: [
7 8
     MapPage,
8 9
   ],
9 10
   imports: [
11
+    DestinationsApiProvider,
10 12
     IonicPageModule.forChild(MapPage),
11 13
   ],
12 14
 })

+ 35
- 8
src/pages/map/map.ts Bestand weergeven

@@ -1,6 +1,8 @@
1 1
 import { Component } from '@angular/core';
2
-import { IonicPage, NavController, NavParams } from 'ionic-angular';
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
+import { AddDestinationPage } from '../add-destination/add-destination';
4 6
 
5 7
 /**
6 8
  * Generated class for the MapPage page.
@@ -16,21 +18,46 @@ import { DestinationDetailsPage } from '../destination-details/destination-detai
16 18
 })
17 19
 export class MapPage {
18 20
 
19
-  public destinations = [
20
-    { id: 1, destinationType: 'past', city: 'Tokyo', country: 'Japan', month: 'Feb ', year: '2018', travelType: 'personal', favoriteThing: 'cleanliness'},
21
-    { id: 2, destinationType: 'future', city: 'Cape Town', country: 'South Africa', month: '', year: '', travelType: 'personal', favoriteThing: ''},
22
-    { id: 3, destinationType: 'future', city: 'London', country: 'United Kingdom', month: '', year: '', travelType: 'personal', favoriteThing: ''},
23
-  ]
21
+  public destinations: any = [];
22
+  public destination: any = {};
24 23
 
25
-  constructor(public navCtrl: NavController, public navParams: NavParams) {
24
+  constructor(public navCtrl: NavController, 
25
+    public navParams: NavParams,
26
+    public destinationApiProvider: DestinationsApiProvider,
27
+    public loadingController: LoadingController) {
26 28
   }
27 29
 
28 30
   ionViewDidLoad() {
29
-    console.log('ionViewDidLoad MapPage');
31
+
32
+    let loader = this.loadingController.create({
33
+      content: 'Getting destinations...'
34
+    });
35
+
36
+    loader.present().then(() => {
37
+      this.getAllDestinations();
38
+      loader.dismiss();
39
+    });
40
+
30 41
   }
31 42
 
32 43
   goToDestinationDetails($event, destination){
33 44
     this.navCtrl.push(DestinationDetailsPage, destination);
34 45
   }
35 46
 
47
+  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;
57
+    })
58
+  }
59
+
60
+  goToAddDestination() {
61
+    this.navCtrl.push(AddDestinationPage);
62
+  }
36 63
 }

+ 16
- 6
src/providers/destinations-api/destinations-api.ts Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 import { HttpClient } from '@angular/common/http';
2 2
 import { Http } from '@angular/http'
3 3
 import { Injectable } from '@angular/core';
4
+import { Observable } from 'rxjs';
4 5
 
5 6
 /*
6 7
   Generated class for the DestinationsApiProvider provider.
@@ -10,15 +11,24 @@ import { Injectable } from '@angular/core';
10 11
 */
11 12
 @Injectable()
12 13
 export class DestinationsApiProvider {
13
-  private baseUrl = "http://localhost:8080"
14
+  private destinationUrl = "http://localhost:9090/api/v1/destinations"
14 15
 
15
-  constructor(public http: Http) {
16
+  constructor(private http: Http) {
16 17
   }
17 18
 
18
-  getDestinations() {
19
-    return new Promise(resolve =>{
20
-      this.http.get(`${this.baseUrl}/destinations.json`).subscribe(res => resolve(res.json()));
21
-    })
19
+  getAllDestinations() {
20
+    return this.http.get(this.destinationUrl);
22 21
   }
23 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
+
24 34
 }

+ 3
- 3
www/build/0.js Bestand weergeven

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([0],{
2 2
 
3
-/***/ 276:
3
+/***/ 280:
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 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__(20);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__signup__ = __webpack_require__(103);
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);
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);

+ 3
- 3
www/build/1.js Bestand weergeven

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([1],{
2 2
 
3
-/***/ 277:
3
+/***/ 281:
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 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__(20);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile__ = __webpack_require__(101);
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);
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
- 3
www/build/2.js Bestand weergeven

@@ -1,14 +1,15 @@
1 1
 webpackJsonp([2],{
2 2
 
3
-/***/ 275:
3
+/***/ 279:
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 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__(20);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map__ = __webpack_require__(102);
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);
12 13
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
13 14
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14 15
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -18,6 +19,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
18 19
 
19 20
 
20 21
 
22
+
21 23
 var MapPageModule = /** @class */ (function () {
22 24
     function MapPageModule() {
23 25
     }
@@ -27,6 +29,7 @@ var MapPageModule = /** @class */ (function () {
27 29
                 __WEBPACK_IMPORTED_MODULE_2__map__["a" /* MapPage */],
28 30
             ],
29 31
             imports: [
32
+                __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */],
30 33
                 __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__map__["a" /* MapPage */]),
31 34
             ],
32 35
         })

+ 1
- 1
www/build/2.js.map Bestand weergeven

@@ -1 +1 @@
1
-{"version":3,"sources":["../../src/pages/map/map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAyC;AACO;AAChB;AAUhC;IAAA;IAA4B,CAAC;IAAhB,aAAa;QARzB,uEAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,qDAAO;aACR;YACD,OAAO,EAAE;gBACP,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';\n\n@NgModule({\n  declarations: [\n    MapPage,\n  ],\n  imports: [\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,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":""}

+ 3
- 3
www/build/3.js Bestand weergeven

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([3],{
2 2
 
3
-/***/ 274:
3
+/***/ 278:
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 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__(20);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login__ = __webpack_require__(100);
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);
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);

+ 3
- 3
www/build/4.js Bestand weergeven

@@ -1,14 +1,14 @@
1 1
 webpackJsonp([4],{
2 2
 
3
-/***/ 273:
3
+/***/ 277:
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 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__(20);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details__ = __webpack_require__(99);
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);
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);

+ 45
- 0
www/build/5.js Bestand weergeven

@@ -0,0 +1,45 @@
1
+webpackJsonp([5],{
2
+
3
+/***/ 276:
4
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
5
+
6
+"use strict";
7
+Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
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);
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
+
20
+
21
+
22
+
23
+var AddDestinationPageModule = /** @class */ (function () {
24
+    function AddDestinationPageModule() {
25
+    }
26
+    AddDestinationPageModule = __decorate([
27
+        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["I" /* NgModule */])({
28
+            declarations: [
29
+                __WEBPACK_IMPORTED_MODULE_2__add_destination__["a" /* AddDestinationPage */],
30
+            ],
31
+            imports: [
32
+                __WEBPACK_IMPORTED_MODULE_3__providers_destinations_api_destinations_api__["a" /* DestinationsApiProvider */],
33
+                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["d" /* IonicPageModule */].forChild(__WEBPACK_IMPORTED_MODULE_2__add_destination__["a" /* AddDestinationPage */]),
34
+            ],
35
+        })
36
+    ], AddDestinationPageModule);
37
+    return AddDestinationPageModule;
38
+}());
39
+
40
+//# sourceMappingURL=add-destination.module.js.map
41
+
42
+/***/ })
43
+
44
+});
45
+//# sourceMappingURL=5.js.map

+ 1
- 0
www/build/5.js.map Bestand weergeven

@@ -0,0 +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":""}

+ 240
- 91
www/build/main.js Bestand weergeven

@@ -1,14 +1,61 @@
1
-webpackJsonp([5],{
1
+webpackJsonp([6],{
2 2
 
3 3
 /***/ 100:
4 4
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5 5
 
6 6
 "use strict";
7
+/* 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);
10
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11
+    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12
+    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13
+    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;
14
+    return c > 3 && r && Object.defineProperty(target, key, r), r;
15
+};
16
+var __metadata = (this && this.__metadata) || function (k, v) {
17
+    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
18
+};
19
+
20
+
21
+/**
22
+ * Generated class for the DestinationDetailsPage page.
23
+ *
24
+ * See https://ionicframework.com/docs/components/#navigation for more info on
25
+ * Ionic pages and navigation.
26
+ */
27
+var DestinationDetailsPage = /** @class */ (function () {
28
+    function DestinationDetailsPage(navCtrl, navParams) {
29
+        this.navCtrl = navCtrl;
30
+        this.navParams = navParams;
31
+        this.destination = {};
32
+    }
33
+    DestinationDetailsPage.prototype.ionViewDidLoad = function () {
34
+        this.destination = this.navParams.data;
35
+    };
36
+    DestinationDetailsPage = __decorate([
37
+        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
38
+            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
+        }),
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])
41
+    ], DestinationDetailsPage);
42
+    return DestinationDetailsPage;
43
+    var _a, _b;
44
+}());
45
+
46
+//# sourceMappingURL=destination-details.js.map
47
+
48
+/***/ }),
49
+
50
+/***/ 101:
51
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
52
+
53
+"use strict";
7 54
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoginPage; });
8 55
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
9
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(20);
10
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__profile_profile__ = __webpack_require__(101);
11
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__signup_signup__ = __webpack_require__(103);
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);
12 59
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
13 60
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14 61
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -40,7 +87,7 @@ var LoginPage = /** @class */ (function () {
40 87
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
41 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"*/,
42 89
         }),
43
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
90
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
44 91
     ], LoginPage);
45 92
     return LoginPage;
46 93
 }());
@@ -49,14 +96,14 @@ var LoginPage = /** @class */ (function () {
49 96
 
50 97
 /***/ }),
51 98
 
52
-/***/ 101:
99
+/***/ 102:
53 100
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
54 101
 
55 102
 "use strict";
56 103
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ProfilePage; });
57 104
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
58
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(20);
59
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__map_map__ = __webpack_require__(102);
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);
60 107
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
61 108
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
62 109
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -90,7 +137,7 @@ var ProfilePage = /** @class */ (function () {
90 137
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
91 138
             selector: 'page-profile',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/profile/profile.html"*/'<!--\n  Generated template for the ProfilePage 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>profile</ion-title>\n  </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n  <button ion-button (click)=goToMap()>Map</button>\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/profile/profile.html"*/,
92 139
         }),
93
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
140
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
94 141
     ], ProfilePage);
95 142
     return ProfilePage;
96 143
 }());
@@ -99,14 +146,16 @@ var ProfilePage = /** @class */ (function () {
99 146
 
100 147
 /***/ }),
101 148
 
102
-/***/ 102:
149
+/***/ 103:
103 150
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
104 151
 
105 152
 "use strict";
106 153
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MapPage; });
107 154
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
108
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(20);
109
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__ = __webpack_require__(99);
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);
110 159
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
111 160
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
112 161
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -119,6 +168,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
119 168
 
120 169
 
121 170
 
171
+
172
+
122 173
 /**
123 174
  * Generated class for the MapPage page.
124 175
  *
@@ -126,42 +177,114 @@ var __metadata = (this && this.__metadata) || function (k, v) {
126 177
  * Ionic pages and navigation.
127 178
  */
128 179
 var MapPage = /** @class */ (function () {
129
-    function MapPage(navCtrl, navParams) {
180
+    function MapPage(navCtrl, navParams, destinationApiProvider, loadingController) {
130 181
         this.navCtrl = navCtrl;
131 182
         this.navParams = navParams;
132
-        this.destinations = [
133
-            { id: 1, destinationType: 'past', city: 'Tokyo', country: 'Japan', month: 'Feb ', year: '2018', travelType: 'personal', favoriteThing: 'cleanliness' },
134
-            { id: 2, destinationType: 'future', city: 'Cape Town', country: 'South Africa', month: '', year: '', travelType: 'personal', favoriteThing: '' },
135
-            { id: 3, destinationType: 'future', city: 'London', country: 'United Kingdom', month: '', year: '', travelType: 'personal', favoriteThing: '' },
136
-        ];
183
+        this.destinationApiProvider = destinationApiProvider;
184
+        this.loadingController = loadingController;
185
+        this.destinations = [];
186
+        this.destination = {};
137 187
     }
138 188
     MapPage.prototype.ionViewDidLoad = function () {
139
-        console.log('ionViewDidLoad MapPage');
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
+        });
140 197
     };
141 198
     MapPage.prototype.goToDestinationDetails = function ($event, destination) {
142 199
         this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_2__destination_details_destination_details__["a" /* DestinationDetailsPage */], destination);
143 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
+    };
144 217
     MapPage = __decorate([
145 218
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
146
-            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</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/map/map.html"*/,
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"*/,
147 220
         }),
148
-        __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]) === "function" && _a || Object, typeof (_b = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]) === "function" && _b || Object])
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])
149 222
     ], MapPage);
150 223
     return MapPage;
151
-    var _a, _b;
224
+    var _a, _b, _c, _d;
152 225
 }());
153 226
 
154 227
 //# sourceMappingURL=map.js.map
155 228
 
156 229
 /***/ }),
157 230
 
158
-/***/ 103:
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:
159 282
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
160 283
 
161 284
 "use strict";
162 285
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SignupPage; });
163 286
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
164
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(20);
287
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(18);
165 288
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
166 289
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
167 290
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -191,7 +314,7 @@ var SignupPage = /** @class */ (function () {
191 314
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
192 315
             selector: 'page-signup',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/signup/signup.html"*/'<!--\n  Generated template for the SignupPage 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>signup</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  <ion-input placeholder="First Name" type="text" #firstName></ion-input>\n  <ion-input placeholder="Last Name" type="text" #lastName></ion-input>\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/signup/signup.html"*/,
193 316
         }),
194
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
317
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
195 318
     ], SignupPage);
196 319
     return SignupPage;
197 320
 }());
@@ -200,7 +323,7 @@ var SignupPage = /** @class */ (function () {
200 323
 
201 324
 /***/ }),
202 325
 
203
-/***/ 113:
326
+/***/ 115:
204 327
 /***/ (function(module, exports) {
205 328
 
206 329
 function webpackEmptyAsyncContext(req) {
@@ -213,32 +336,36 @@ function webpackEmptyAsyncContext(req) {
213 336
 webpackEmptyAsyncContext.keys = function() { return []; };
214 337
 webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
215 338
 module.exports = webpackEmptyAsyncContext;
216
-webpackEmptyAsyncContext.id = 113;
339
+webpackEmptyAsyncContext.id = 115;
217 340
 
218 341
 /***/ }),
219 342
 
220
-/***/ 154:
343
+/***/ 156:
221 344
 /***/ (function(module, exports, __webpack_require__) {
222 345
 
223 346
 var map = {
347
+	"../pages/add-destination/add-destination.module": [
348
+		276,
349
+		5
350
+	],
224 351
 	"../pages/destination-details/destination-details.module": [
225
-		273,
352
+		277,
226 353
 		4
227 354
 	],
228 355
 	"../pages/login/login.module": [
229
-		274,
356
+		278,
230 357
 		3
231 358
 	],
232 359
 	"../pages/map/map.module": [
233
-		275,
360
+		279,
234 361
 		2
235 362
 	],
236 363
 	"../pages/profile/profile.module": [
237
-		277,
364
+		281,
238 365
 		1
239 366
 	],
240 367
 	"../pages/signup/signup.module": [
241
-		276,
368
+		280,
242 369
 		0
243 370
 	]
244 371
 };
@@ -253,19 +380,19 @@ function webpackAsyncContext(req) {
253 380
 webpackAsyncContext.keys = function webpackAsyncContextKeys() {
254 381
 	return Object.keys(map);
255 382
 };
256
-webpackAsyncContext.id = 154;
383
+webpackAsyncContext.id = 156;
257 384
 module.exports = webpackAsyncContext;
258 385
 
259 386
 /***/ }),
260 387
 
261
-/***/ 198:
388
+/***/ 201:
262 389
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
263 390
 
264 391
 "use strict";
265 392
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HomePage; });
266 393
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
267
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(20);
268
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__login_login__ = __webpack_require__(100);
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);
269 396
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
270 397
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
271 398
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -289,7 +416,7 @@ var HomePage = /** @class */ (function () {
289 416
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
290 417
             selector: 'page-home',template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/home/home.html"*/'<ion-header>\n  <ion-navbar>\n    <ion-title>\n      Shared Travel Map\n    </ion-title>\n  </ion-navbar>\n</ion-header>\n\n<ion-content padding>\n    <button ion-button (click)=goToLogin()>Login</button>\n</ion-content>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/pages/home/home.html"*/
291 418
         }),
292
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */]])
419
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */]])
293 420
     ], HomePage);
294 421
     return HomePage;
295 422
 }());
@@ -298,13 +425,13 @@ var HomePage = /** @class */ (function () {
298 425
 
299 426
 /***/ }),
300 427
 
301
-/***/ 199:
428
+/***/ 202:
302 429
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
303 430
 
304 431
 "use strict";
305 432
 Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
306
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(200);
307
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(222);
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);
308 435
 
309 436
 
310 437
 Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_1__app_module__["a" /* AppModule */]);
@@ -312,23 +439,26 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
312 439
 
313 440
 /***/ }),
314 441
 
315
-/***/ 222:
442
+/***/ 225:
316 443
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
317 444
 
318 445
 "use strict";
319 446
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
320
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(31);
447
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(27);
321 448
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
322
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(20);
323
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(194);
324
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__ = __webpack_require__(197);
325
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_component__ = __webpack_require__(272);
326
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pages_home_home__ = __webpack_require__(198);
327
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__pages_login_login__ = __webpack_require__(100);
328
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pages_signup_signup__ = __webpack_require__(103);
329
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pages_profile_profile__ = __webpack_require__(101);
330
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__pages_map_map__ = __webpack_require__(102);
331
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__pages_destination_details_destination_details__ = __webpack_require__(99);
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);
332 462
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
333 463
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
334 464
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -347,6 +477,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
347 477
 
348 478
 
349 479
 
480
+
481
+
482
+
350 483
 var config = {
351 484
     issuer: 'https://dev-270119.oktapreview.com/oauth2/default',
352 485
     redirectUri: 'http://localhost:8100/implicit/callback',
@@ -358,18 +491,21 @@ var AppModule = /** @class */ (function () {
358 491
     AppModule = __decorate([
359 492
         Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["I" /* NgModule */])({
360 493
             declarations: [
361
-                __WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* MyApp */],
362
-                __WEBPACK_IMPORTED_MODULE_6__pages_home_home__["a" /* HomePage */],
363
-                __WEBPACK_IMPORTED_MODULE_7__pages_login_login__["a" /* LoginPage */],
364
-                __WEBPACK_IMPORTED_MODULE_8__pages_signup_signup__["a" /* SignupPage */],
365
-                __WEBPACK_IMPORTED_MODULE_9__pages_profile_profile__["a" /* ProfilePage */],
366
-                __WEBPACK_IMPORTED_MODULE_10__pages_map_map__["a" /* MapPage */],
367
-                __WEBPACK_IMPORTED_MODULE_11__pages_destination_details_destination_details__["a" /* DestinationDetailsPage */]
494
+                __WEBPACK_IMPORTED_MODULE_6__app_component__["a" /* MyApp */],
495
+                __WEBPACK_IMPORTED_MODULE_7__pages_home_home__["a" /* HomePage */],
496
+                __WEBPACK_IMPORTED_MODULE_8__pages_login_login__["a" /* LoginPage */],
497
+                __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__["a" /* SignupPage */],
498
+                __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__["a" /* ProfilePage */],
499
+                __WEBPACK_IMPORTED_MODULE_11__pages_map_map__["a" /* MapPage */],
500
+                __WEBPACK_IMPORTED_MODULE_14__pages_add_destination_add_destination__["a" /* AddDestinationPage */],
501
+                __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__["a" /* DestinationDetailsPage */]
368 502
             ],
369 503
             imports: [
370 504
                 __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__["a" /* BrowserModule */],
371
-                __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["c" /* IonicModule */].forRoot(__WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* MyApp */], {}, {
505
+                __WEBPACK_IMPORTED_MODULE_5__angular_http__["b" /* HttpModule */],
506
+                __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["c" /* IonicModule */].forRoot(__WEBPACK_IMPORTED_MODULE_6__app_component__["a" /* MyApp */], {}, {
372 507
                     links: [
508
+                        { loadChildren: '../pages/add-destination/add-destination.module#AddDestinationPageModule', name: 'AddDestinationPage', segment: 'add-destination', priority: 'low', defaultHistory: [] },
373 509
                         { loadChildren: '../pages/destination-details/destination-details.module#DestinationDetailsPageModule', name: 'DestinationDetailsPage', segment: 'destination-details', priority: 'low', defaultHistory: [] },
374 510
                         { loadChildren: '../pages/login/login.module#LoginPageModule', name: 'LoginPage', segment: 'login', priority: 'low', defaultHistory: [] },
375 511
                         { loadChildren: '../pages/map/map.module#MapPageModule', name: 'MapPage', segment: 'map', priority: 'low', defaultHistory: [] },
@@ -380,18 +516,20 @@ var AppModule = /** @class */ (function () {
380 516
             ],
381 517
             bootstrap: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["a" /* IonicApp */]],
382 518
             entryComponents: [
383
-                __WEBPACK_IMPORTED_MODULE_5__app_component__["a" /* MyApp */],
384
-                __WEBPACK_IMPORTED_MODULE_6__pages_home_home__["a" /* HomePage */],
385
-                __WEBPACK_IMPORTED_MODULE_7__pages_login_login__["a" /* LoginPage */],
386
-                __WEBPACK_IMPORTED_MODULE_8__pages_signup_signup__["a" /* SignupPage */],
387
-                __WEBPACK_IMPORTED_MODULE_9__pages_profile_profile__["a" /* ProfilePage */],
388
-                __WEBPACK_IMPORTED_MODULE_10__pages_map_map__["a" /* MapPage */],
389
-                __WEBPACK_IMPORTED_MODULE_11__pages_destination_details_destination_details__["a" /* DestinationDetailsPage */]
519
+                __WEBPACK_IMPORTED_MODULE_6__app_component__["a" /* MyApp */],
520
+                __WEBPACK_IMPORTED_MODULE_7__pages_home_home__["a" /* HomePage */],
521
+                __WEBPACK_IMPORTED_MODULE_8__pages_login_login__["a" /* LoginPage */],
522
+                __WEBPACK_IMPORTED_MODULE_9__pages_signup_signup__["a" /* SignupPage */],
523
+                __WEBPACK_IMPORTED_MODULE_10__pages_profile_profile__["a" /* ProfilePage */],
524
+                __WEBPACK_IMPORTED_MODULE_11__pages_map_map__["a" /* MapPage */],
525
+                __WEBPACK_IMPORTED_MODULE_14__pages_add_destination_add_destination__["a" /* AddDestinationPage */],
526
+                __WEBPACK_IMPORTED_MODULE_12__pages_destination_details_destination_details__["a" /* DestinationDetailsPage */]
390 527
             ],
391 528
             providers: [
392 529
                 __WEBPACK_IMPORTED_MODULE_4__ionic_native_status_bar__["a" /* StatusBar */],
393 530
                 __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */],
394
-                { provide: __WEBPACK_IMPORTED_MODULE_1__angular_core__["u" /* ErrorHandler */], useClass: __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["b" /* IonicErrorHandler */] }
531
+                { 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 */]
395 533
             ]
396 534
         })
397 535
     ], AppModule);
@@ -402,16 +540,16 @@ var AppModule = /** @class */ (function () {
402 540
 
403 541
 /***/ }),
404 542
 
405
-/***/ 272:
543
+/***/ 275:
406 544
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
407 545
 
408 546
 "use strict";
409 547
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MyApp; });
410 548
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
411
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(20);
412
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(197);
413
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(194);
414
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(198);
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);
415 553
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
416 554
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
417 555
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -439,7 +577,7 @@ var MyApp = /** @class */ (function () {
439 577
     MyApp = __decorate([
440 578
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/app/app.html"*/'<ion-nav [root]="rootPage"></ion-nav>\n'/*ion-inline-end:"/Users/ericf/ZCWProjects/SharedTravelMapIonicApp/src/app/app.html"*/
441 579
         }),
442
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* Platform */], __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */], __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]])
580
+        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* Platform */], __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */], __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]])
443 581
     ], MyApp);
444 582
     return MyApp;
445 583
 }());
@@ -452,9 +590,11 @@ var MyApp = /** @class */ (function () {
452 590
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
453 591
 
454 592
 "use strict";
455
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DestinationDetailsPage; });
593
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AddDestinationPage; });
456 594
 /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
457
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(20);
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);
458 598
 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
459 599
     var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
460 600
     if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -466,34 +606,43 @@ var __metadata = (this && this.__metadata) || function (k, v) {
466 606
 };
467 607
 
468 608
 
609
+
610
+
469 611
 /**
470
- * Generated class for the DestinationDetailsPage page.
612
+ * Generated class for the AddDestinationPage page.
471 613
  *
472 614
  * See https://ionicframework.com/docs/components/#navigation for more info on
473 615
  * Ionic pages and navigation.
474 616
  */
475
-var DestinationDetailsPage = /** @class */ (function () {
476
-    function DestinationDetailsPage(navCtrl, navParams) {
617
+var AddDestinationPage = /** @class */ (function () {
618
+    function AddDestinationPage(navCtrl, navParams, formBuilder, destinationApiProvider) {
477 619
         this.navCtrl = navCtrl;
478 620
         this.navParams = navParams;
479
-        this.destination = {};
480
-        this.destination = this.navParams.data;
621
+        this.formBuilder = formBuilder;
622
+        this.destinationApiProvider = destinationApiProvider;
623
+        this.destinationForm = this.formBuilder.group({
624
+            city: [''],
625
+            country: ['']
626
+        });
481 627
     }
482
-    DestinationDetailsPage.prototype.ionViewDidLoad = function () {
483
-        console.log('ionViewDidLoad DestinationDetailsPage');
628
+    AddDestinationPage.prototype.ionViewDidLoad = function () {
629
+        console.log('ionViewDidLoad AddDestinationPage');
484 630
     };
485
-    DestinationDetailsPage = __decorate([
631
+    AddDestinationPage.prototype.createDestination = function () {
632
+    };
633
+    AddDestinationPage = __decorate([
486 634
         Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
487
-            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"*/,
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"*/,
488 636
         }),
489
-        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavParams */]])
490
-    ], DestinationDetailsPage);
491
-    return DestinationDetailsPage;
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;
492 641
 }());
493 642
 
494
-//# sourceMappingURL=destination-details.js.map
643
+//# sourceMappingURL=add-destination.js.map
495 644
 
496 645
 /***/ })
497 646
 
498
-},[199]);
647
+},[202]);
499 648
 //# sourceMappingURL=main.js.map

+ 1
- 1
www/build/main.js.map
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 9842
- 7032
www/build/vendor.js
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 1
- 1
www/build/vendor.js.map
Diff onderdrukt omdat het te groot bestand
Bestand weergeven