On my single-page app when I change from a div to another div (with different contents) using ngSwitch, the scroll position stays the same - so when the new div appears, the position is not at the top.
I would think there must be a simple solution I just don’t know of, but anyway here is what I tried so far:
@ViewChild(Content)): OK, this does make the page scroll to the top, but it just slowly crawls up, and that’s not that great. What I want is simply to start at the top, so set the scroll position to top instantly. I could not find how I might modify the speed for this function.
scrollTo(0, 0);and so on in pure JS: they just don’t work in ionic it seems.
I tried inserting a dummy div with no content and changing first to that before the actual one I want to display, to trick the scroll position into a zero position, but still it does not work, scroll stays where it was set in the original div.