One modal, but different background images that change on tap

I have 2 pages, one home page the other one is modal. Modal has its own background, but how can I change modals background by clicking something on the homepage?


something here


.scroll-content {
    background-image: url("image.jpg") !important; 


<div class="circle" (tap)="openModal1($event)">


tapMiddle(e) {

So basicly, when someone clicks on a div, it is supposed to open the modal and change the background. How can this be done?

Can you achieve your goal by passing the image filename in via NavParams when the modal is created, storing it in a property of the modal component, and then binding to [style.background] in the modal template?

Yes, I managed to do it with NavParams for sending data from first to other page.