HOW TO PASS DATA FROM PAGE TO MODALS IN IONIC 3

Share the post
How_to_pass_data_from_page_to_modals

 

 

How to pass data from page to modals in Ionic? 

Now, On this topic, We will discuss how to pass data from page to modals. If you see in the below image the second parameter we are passing is ‘123456’.It’s a random number you can pass your data here and if you want to see the data in our modal page then you can use the nav params function to get data.

Please see the below image for reference.

Passing Data :

Ionic%2BComponent%2BModalController%2BCallFunctionTS
 
 
 

Console Output :

In the console, You can clearly see the data ‘123456’ which we have passed from the page. like this, You can pass any data or you can directly pass the object.

Ionic%2BComponent%2BModalController%2BPassingData

So, that’s it you can pass the data from page to modals. see you later. 🙂

Leave a Comment