Hello All, In this topic we will learn to pass data from page to modals in Ionic.
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. As 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 on our modal page then you can use the nav params function to get data.
Please see the below image for reference.
Passing Data :
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.
So, that’s it you can pass the data from page to modals. see you later. 🙂