Passing data to modal page component in Ionic

We can also pass some data to a modal page component using the second parameter of create() method ,passed data can be of any type : string , number or object .
Sample:
Create a parameter ‘data’ and pass it as second parameter of create() method.

Inorder to retrieve the data use NavParams in the ModalPage. To receive data as soon as Modal loads write in ionViewDidLoad()

Leave a Reply

Your email address will not be published. Required fields are marked *