I have a component my_component
with a ion-content
, which im using inside one of my pages my_page
, which also has another ion-content
.
Because I need to do some manual handling of the scrolling, I need to be able to access the ion-content element of my_page
from the component (that is, from my_component.ts
).
Is there a way of doing this?
Thanks!
//--------------- my_component.html
<ion-content>
...
</ion-content>
//--------------- my_page.html
<ion-content>
...
<my_component></my_component>
...
</ion-content>
//--------------- my_component.ts
export class MyComponent {
// Here, I need a ref to my_page <ion-content>
@ViewChild(Content) content: Content;
constructor() { ... }
}