Scroll down to certain point before page content displayed


I just want to know if there are any way to load an ionic page at some specific scroll point in the page, before the content is displayed. I am working with ionic v6.

For example. I have a forum with a list of topics and when my user want to see the posts in a particular topic, i want the ionic page load exactly in the scroll position of last post the user has seem, without any animation of scrolling down or whatever. Just show up exactly in the scroll-y position i want.

I remember with ionic 3 i used some like:

@ViewChild(Content) content: Content;

constructor(private viewCtrl: ViewController,...) {
    let _viewCtrlWriteSub = this.viewCtrl.writeReady.subscribe(() => {
         .... code to get the post index ....
         // get scroll 'height' of HTMLElement ref
        let height = document.getElementById("post-"+this.posts[index].post_number).offsetTop;
        this.content.scrollTo(0, height, 0);

Thank you very much