import { Component } from '@angular/core';
import { NavController, NavParams, ModalController } from 'ionic-angular';
import { HealthProvider } from '../../providers/health/health';
import { NewsReaderPage } from '../news-reader/news-reader';
@Component({
  selector: 'page-contact',
  templateUrl: 'contact.html'
})
export class ContactPage {
  news;
  imageURL;
  constructor(public navCtrl: NavController, private hp: HealthProvider,
    private mc: ModalController, private navParams: NavParams) {

    this.imageURL = "http://www.sportgalaxy.xyz/";
    this.hp.galaxyNews({})
      .subscribe( data => {
        this.news = data;
      });
  }

  openModal(p) {
    let modal = this.mc.create(NewsReaderPage, { id: p._id.$oid});
    modal.present();

  }
}
