Well in my case i would need to trigger event from Home Page component (my side menu is on App component). This will be a button to open side menu. However the button itself is not inside ion-content, so can’t use your logic using viewchild.
I have use the code from chandroiud but only scrolls up the left menu, the rigth menu is ignored. Is there any way to have a reference to the right content or both contents?
This worked for me but only when the menu is being shown. In my case I show notification list on the menu, and the content changes on different pages. I would like to scroll to the top when I change the content, when the menu is not being shown. Is there someway to do it? Currently I’m scrolling to the top using the ionOpen event
The reason it doesn’t work is because the triggers display: none; and display: block; for it’s visibility. So scrollToTop() doesn’t work for elements with display: none;
Anyway, there’s a solution to force scroll the side menu to top on close.