import { Component } from '@angular/core' ; import { NavController , NavParams , ModalController } from 'ionic-angular' ; import { ModalPost } from '../modal-post/modal-post' ; @ Component ( { selector : 'page-search' , templateUrl : 'search.html' , } ) export class Search { public search_data = [ { id : 1 , username : 'candelibas' , profile_img : 'https://avatars1.githubusercontent.com/u/918975?v=3&s=120' , post_img : 'https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/13473123_1544898359150795_654626889_n.jpg' } , { id : 2 , username : 'candelibas' , profile_img : 'https://avatars1.githubusercontent.com/u/918975?v=3&s=120' , post_img : 'https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/12940826_1673029922963013_921771297_n.jpg' } , { id : 3 , username : 'candelibas' , profile_img : 'https://avatars1.githubusercontent.com/u/918975?v=3&s=120' , post_img : 'https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e15/10852865_738738146215825_1258215298_n.jpg' } , { id : 4 , username : 'candelibas' , profile_img : 'https://avatars1.githubusercontent.com/u/918975?v=3&s=120' , post_img : 'https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e15/891528_841068522581102_1591061904_n.jpg' } , { id : 5 , username : 'candelibas' , profile_img : 'https://avatars1.githubusercontent.com/u/918975?v=3&s=120' , post_img : 'https://scontent-frx5-1.cdninstagram.com/t51.2885-15/e35/10809765_1474804169496730_887570428_n.jpg' } , { id : 6 , username : 'candelibas' , profile_img : 'https://avatars1.githubusercontent.com/u/918975?v=3&s=120' , post_img : 'https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e15/891515_1524153351163603_439436363_n.jpg' } ] ; constructor ( public navCtrl , public navParams , public modalCtrl ) { } getItems ( ) { } pressPhoto ( user_id , username , profile_img , post_img ) { this . presentModal ( user_id , username , profile_img , post_img ) ; } presentModal ( user_id , username , profile_img , post_img ) { let modal = this . modalCtrl . create ( ModalPost , { user_id : user_id , username : username , profile_img : profile_img , post_img : post_img } , { showBackdrop : true , enableBackdropDismiss : true } ) ; modal . present ( ) ; } }