diff --git a/Queercon/src/app/app.module.ts b/Queercon/src/app/app.module.ts index 20e8b77..61b5989 100644 --- a/Queercon/src/app/app.module.ts +++ b/Queercon/src/app/app.module.ts @@ -2,6 +2,7 @@ import { NgModule, ErrorHandler } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; import { MyApp } from './app.component'; +import { HttpModule } from '@angular/http'; import { HomePage } from '../pages/home/home'; import { Qc15Page } from '../pages/qc15/qc15'; @@ -40,6 +41,7 @@ import { OneSignal } from '@ionic-native/onesignal'; ], imports: [ BrowserModule, + HttpModule, IonicModule.forRoot(MyApp, { statusbarPadding: false, }, diff --git a/Queercon/src/assets/json/events.json b/Queercon/src/assets/json/events.json new file mode 100644 index 0000000..c8f4195 --- /dev/null +++ b/Queercon/src/assets/json/events.json @@ -0,0 +1,44 @@ +{ + "events": [ + { + "title": "Queercon Mixer", + "location": "Queercon Suite", + "summary": "Join us for something awesome and this will be fun. Except not for the staff, just for attendees. For the rest of us this is nonstop miserable work.", + "date": "04 AUG", + "hours": "16:00 - 20:00", + "icon1": "X", + "description": "This is for the details page", + "host": "QC" + }, + { + "title": "Queercon Mixer", + "location": "Queercon Suite", + "summary": "Join us for something awesome and this will be fun. Except not for the staff, just for attendees. For the rest of us this is nonstop miserable work.", + "date": "04 AUG", + "hours": "16:00 - 20:00", + "icon1": "X", + "description": "This is for the details page", + "host": "QC" + }, + { + "title": "Queercon Mixer", + "location": "Queercon Suite", + "summary": "Join us for something awesome and this will be fun. Except not for the staff, just for attendees. For the rest of us this is nonstop miserable work.", + "date": "04 AUG", + "hours": "16:00 - 20:00", + "icon1": "X", + "description": "This is for the details page", + "host": "QC" + }, + { + "title": "Queercon Mixer", + "location": "Queercon Suite", + "summary": "Join us for something awesome and this will be fun. Except not for the staff, just for attendees. For the rest of us this is nonstop miserable work.", + "date": "04 AUG", + "hours": "16:00 - 20:00", + "icon1": "X", + "description": "This is for the details page", + "host": "QC" + } + ] +} \ No newline at end of file diff --git a/Queercon/src/pages/events/events.ts b/Queercon/src/pages/events/events.ts index a2a8e3e..d8e6490 100644 --- a/Queercon/src/pages/events/events.ts +++ b/Queercon/src/pages/events/events.ts @@ -1,5 +1,7 @@ import { Component } from '@angular/core'; import { NavController, NavParams } from 'ionic-angular'; +import { Http } from '@angular/http'; +import 'rxjs/add/operator/map'; @Component({ @@ -20,11 +22,17 @@ export class EventsDetailsPage { }) export class EventsPage { /* Remove in staging *///private webWiew: any = window; + itemsOld = []; items = []; - constructor(public nav: NavController) { + constructor(public nav: NavController, public http: Http) { console.log('QC Events constructor loaded'); - this.items = [ + let localData = this.http.get('../assets/json/events.json').map(res => res.json().events); + localData.subscribe(data => { + this.items = data; + }) + + this.itemsOld = [ { "title": "Queercon Mixer", "location": "Queercon Suite",