import { Component , Input , OnInit } from '@angular/core' ; import { NavController , ModalController } from '@ionic/angular' ; import { DomSanitizer } from '@angular/platform-browser' ; @ Component ( { selector : 'app-image' , templateUrl : './image.page.html' , styleUrls : [ './image.page.scss' ] , } ) export class ImagePage implements OnInit { @ Input ( ) value : any ; public image : any ; constructor ( private nav , private modalCtrl , private sanitizer ) { } ngOnInit ( ) { this . image = this . sanitizer . bypassSecurityTrustStyle ( this . value ) ; } closeModal ( ) { this . modalCtrl . dismiss ( ) ; } }