import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

/**
 * Generated class for the TermsPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-terms',
  templateUrl: 'terms.html',
})
export class TermsPage {
	
	htmlStr: string;
	title: any;
	data: any;

  constructor(public navCtrl: NavController, public navParams: NavParams) {
	  this.data = this.navParams.get('data')
	  var page = this.navParams.get('page')
	  console.log(this.data)
	  if(page == 'terms'){
			this.title = 'T&C'
			this.htmlStr= this.data.terms_conditions;
	  }
		else  if(page == 'privacy'){
			this.title = 'Privacy Policy'
			this.htmlStr= this.data.privacy_policy;
		}
		else  if(page == 'impressum'){
			this.title = 'Impressum'
			this.htmlStr= this.data.impressum;
		}
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad TermsPag');
  }
    	back(){
		this.navCtrl.pop();
	}

}
