import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ModalController, NavParams } from '@ionic/angular';
import { Tab1Service } from '../tab1/tab1.service';

@Component({
  selector: 'app-galeriamodal',
  templateUrl: './galeriamodal.page.html',
  styleUrls: ['./galeriamodal.page.scss'],
})
export class GaleriamodalPage implements OnInit {

  foto: string;

  sliderOpts = {
    
  }
  constructor(private navParams: NavParams, private modalController: ModalController, private tab1Service: Tab1Service,
    private router: Router) { }

  ngOnInit() {
    this.foto = this.navParams.get('foto');
  }


  borrar(){
    let index = this.tab1Service.galeria.indexOf('foto');
    this.tab1Service.galeria.slice[index];
    this.close();
  }

  close(){
    this.modalController.dismiss();
  }

}
