I\'ve looked at several related posts and documentation, but still can\'t seem to get expected behavior from @ViewChild.
Ultimately, I\'m trying to set the scroll p
I had a similar issue. Unlike you, my @ViewChild returned a valid ElementRef, but when I tried to access its nativeElement, it was undefined.
@ViewChild
ElementRef
nativeElement
undefined
I resolved it by setting the view id like #content, not like #content = "ngModel".
id
#content
#content = "ngModel"