My Modal
const modal = await this.modalCtrl.create({
component: SelectSchedulePage,
cssClass: 'modal-bottom-sheet',
initialBreakpoint: 0.3,
breakpoints: [0.3, 0.5],
backdropDismiss: false,
backdropBreakpoint: 0.3,
handleBehavior: 'cycle',
componentProps: {
busEta: this.busEta
},
}).then(modal => modal.present());;
SelectSchedulePage Component
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-select-schedule',
templateUrl: './select-schedule.page.html',
styleUrls: ['./select-schedule.page.scss'],
})
export class SelectSchedulePage implements OnInit {
@Input() busEta: any;
onReminder: boolean = false;
selectedSchedule: any;
constructor() { }
ngOnInit() { }
}
Assume i want to update busEta every time i clicked button on parent page, and display on modal content while modal still showed up without closing it