Ionic App Parameter Returning Undefined


Problem:

When developing an ionic app, sometimes parameters passed through a navController can return a value of Undefined, this is so annoying when you are trying to pass data from one page to another in Ionic Cordova app.

Solution:
Make sure that you are getting the values passed from a navController from the ionViewDidLoad() function, because this function fires after all components or necessary components are loaded, that time the function is firing all data might be loaded already.

[NB] Research about Ionic Page Life Cycle to understand more events in SDL (Software Design Lifecycle) 

If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2023 - ErnesTech LLC- Privacy