Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Using template, get code access to ion? component instance for methods

$
0
0

i built my app with templates of Ion??? components.

now I need to call a method on the IonSlides component instance… How do I get that object to invoke methods (next/prev slide)

and i’ve done a good job isolating functions into separate components, uh, but…

the component that needs the instance object is 3 children down the tree

ionslides (id=???) 
   ionslide
       local slide component
              header component
              content component
              footer component  < ---- this component holds the buttons to push next/prev

in the angular version I created a local variable from the imported ionslides component

export class HomePage {

  @ViewChild(Slides) sliderComponent: Slides;

(but didn’t have to pass it down the tree…)

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



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