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


@IonicPage()
@Component({
  selector: 'page-success',
  templateUrl: 'success.html',
})
export class SuccessPage {
	book_vals:any;
	page:any;
  constructor(platform: Platform,public navCtrl: NavController, public navParams: NavParams,public events: Events) {
	 
			  let backAction =  platform.registerBackButtonAction(() => {
        console.log("backPressed success page");
        this.navCtrl.push('TabsPage');
        backAction();
      },2)
		this.book_vals = this.navParams.get('datas');
		console.log(this.book_vals);
		this.page = this.navParams.get('page');
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad SuccessPage');
  }
  back()
  {
    this.navCtrl.pop();
  } 
  goto_home()
  {
	  
	  this.events.publish('user:pool_requests', '');
    this.navCtrl.push('TabsPage');
  }
  

}
