Setting nativeElement.scrollTop is not working in android app in angular

112
January 22, 2021, at 05:40 AM

My code is working fine in browser but it has no effect in android app. Is there anything missing for android app to work? Can anybody please help? Thankyou in advance

Following is my html code:

<div class="form-data-wrapper" #itemContainer>
<div class="item-form-inner">
</div>
</div>

Following is my type script code:

@ViewChild('itemContainer', { static: true })
  private itemContainer: ElementRef;
 ngOnInit() {
const sub3 = this.itemContextService.itemService.user$
      .pipe(
        switchMap(_ => {
          //some code goes here
        }),
        switchMap(res => {
          //some code goes here
      )
 .subscribe(_ => {
        this.itemContainer.nativeElement.scrollTop = 0;
      });
    this.registerSubscription(sub3);
}
READ ALSO
How to pass token to verify user across html pages using node js

How to pass token to verify user across html pages using node js

I am trying to pass a token that verifies which user is logged in across html pagesOnce the user logs in a token is created which contains the user _Id

77
How to add css animation keyframe to jointjs element

How to add css animation keyframe to jointjs element

I am creating jointjs custom element type using basicextend() method like below

119
Change WooCommerce phone number link on emails

Change WooCommerce phone number link on emails

I need WooCommerce email phone number to open Whatsapp on clickCurrently when I click on it, it opens option to dial the number, I want to change this to open to Whatsapp

124
Return ASP.NET Core MVC ViewBag from Controller into View using jQuery

Return ASP.NET Core MVC ViewBag from Controller into View using jQuery

I am trying to return the value of a ViewBag into a html dropdown (on a form) in my View in the <script> area using jQueryI trigger the Controller side based on the value of another dropdown (on a form) as follows:

137