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

Call a method on another page

$
0
0

@crkvend wrote:

Hi,

Say I have a page with a public method called foo(). From that page, I navigate to a new page using nav.push(). How would I be able to run foo() from the second page?

You can call methods on components using app.getComponent, but unfortunately, getComponent doesn't seem to be able to return page components.

So is there any way of doing something like this:
app.getComponents('MyFirstPage').foo() ?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



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