permite ver fotos de la galería en grande
This commit is contained in:
17
src/app/galeriamodal/galeriamodal-routing.module.ts
Normal file
17
src/app/galeriamodal/galeriamodal-routing.module.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { GaleriamodalPage } from './galeriamodal.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: GaleriamodalPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class GaleriamodalPageRoutingModule {}
|
||||
20
src/app/galeriamodal/galeriamodal.module.ts
Normal file
20
src/app/galeriamodal/galeriamodal.module.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GaleriamodalPageRoutingModule } from './galeriamodal-routing.module';
|
||||
|
||||
import { GaleriamodalPage } from './galeriamodal.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
GaleriamodalPageRoutingModule
|
||||
],
|
||||
declarations: [GaleriamodalPage]
|
||||
})
|
||||
export class GaleriamodalPageModule {}
|
||||
15
src/app/galeriamodal/galeriamodal.page.html
Normal file
15
src/app/galeriamodal/galeriamodal.page.html
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
<ion-content fullscreen>
|
||||
|
||||
<ion-button (click)="close()">
|
||||
<ion-icon name="close" slot="start"></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
<ion-slide>
|
||||
<img src="{{foto}}">
|
||||
</ion-slide>
|
||||
|
||||
<ion-button (click)="borrar()">
|
||||
<ion-icon name="trash-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-content>
|
||||
4
src/app/galeriamodal/galeriamodal.page.scss
Normal file
4
src/app/galeriamodal/galeriamodal.page.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
ion-content {
|
||||
background: rgba(0, 0, 0, 0.589)
|
||||
|
||||
}
|
||||
24
src/app/galeriamodal/galeriamodal.page.spec.ts
Normal file
24
src/app/galeriamodal/galeriamodal.page.spec.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GaleriamodalPage } from './galeriamodal.page';
|
||||
|
||||
describe('GaleriamodalPage', () => {
|
||||
let component: GaleriamodalPage;
|
||||
let fixture: ComponentFixture<GaleriamodalPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ GaleriamodalPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GaleriamodalPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
36
src/app/galeriamodal/galeriamodal.page.ts
Normal file
36
src/app/galeriamodal/galeriamodal.page.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user