Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70442

Calling one page method to another page

$
0
0

Hi,

I have two pages one contacts and another one contacts history.

To avoid the reputation of code, i am calling contact method in contacts history page.

using declare var window and window.contacts=this; in contacts page.

and contact history page again declare var window. and calling the method

window.contacts.gethistory(id) when i first render in contacts page and go to contacts history page click the button that time contact method calling successfully. if i render the contacts history directly and click the button means the below error is coming

ERROR TypeError: Cannot read property ‘gethistory’ of undefined. How to solve this.

Thanks in Advance

Regards,
Ramji

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70442

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>