
import { Component, OnInit, ViewChild, } from '@angular/core';
import { IonSlides } from '@ionic/angular';
import { Location } from '@angular/common';
import { trigger, transition, animate, style } from '@angular/animations';
import { Router,ActivatedRoute } from '@angular/router';

@Component({
  selector: 'app-productbooking',
  templateUrl: './productbooking.page.html',
  styleUrls: ['./productbooking.page.scss'],
})
export class ProductbookingPage implements OnInit {
  @ViewChild(IonSlides) slides: IonSlides;
  currentIndex: any;

  constructor(
    private router: Router,
    private route: ActivatedRoute,
    private location: Location
  ) { }

  ngOnInit() {
  }

  goToPage(path,data=null){
    this.router.navigateByUrl(path,{queryParams:data});
    document.body.scrollTop = document.documentElement.scrollTop = 0;
  }

  goBack() {
    this.location.back();
  }

  slidesOpts = {
    slidesPerView: 1
  }

  next() {
    this.slides.slideNext();
  }

  prev() {
    this.slides.slidePrev();
  }

}
