@aligassan wrote:
l used modal Controller dialog for for Ionic 4 to get parameters from another page . i did coding in correct way and when l click on button to launching a modal Controller he doesn’t show . even i added model page in declarations and entryComponents but unfortunately same problem
You can see there in image console log he bring data parameters from another already without execute button to do that . he look like present modal controller automatic .
code for modal controller
async addWeather(){ const AddWeatherModal = await this.modalController.create({ component: AddPagePage, }); await AddWeatherModal.present() await AddWeatherModal.onDidDismiss().then((r) => { if(r.data.result){ this.getWeather(r.data.result) console.log(r) }else if (r.data.result ==""){ this.AlertNotSelected() console.log("No Data . ") } }); }
html
<ion-header> <ion-toolbar> <ion-buttons slot="start"> <ion-menu-button autoHide="true"></ion-menu-button> </ion-buttons> <ion-buttons slot="primary"> <ion-button (click)="addWeather()"> <ion-icon slot="icon-only" name="search"></ion-icon> </ion-button> </ion-buttons> <ion-title text-center>محطات الرصد الجوي</ion-title> </ion-toolbar> </ion-header> <ion-content > </ion-content>
any help please?
Posts: 1
Participants: 1