Call a method from another page

In my ionic project, it has two pages, i want to calla function from first page on second page how it possible.

see inheritance concept.

can you explain the code ? pleas

HI, @Faizyfaazz

This is the Below example of inheritance concept.


I completely disagree that inheritance is useful here. Please describe what exactly this function does. If it doesn’t involve anything having to do with the view layer, I would recommend hoisting it into a service provider, after which both pages can inject said provider and call it.

1 Like