Top "Viewchild" questions

ViewChild is a decorator for Angular component variables, which allow to bind a template element.

@viewChild not working - cannot read property nativeElement of undefined

I'm trying to access a native element in order to focus on it when another element is clicked (much like …

angular viewchild
@ViewChild in *ngIf

Question What is the most elegant way to get @ViewChild after corresponding element in template was shown? Below is an …

angular angular2-changedetection viewchild
How should I use the new static option for @ViewChild in Angular 8?

How should I configure the new Angular 8 view child? @ViewChild('searchText', {read: ElementRef, static: false}) public searchTextInput: ElementRef; vs @ViewChild(…

angular angular8 viewchild
Angular 2 @ViewChild returns undefined

I've looked at several related posts and documentation, but still can't seem to get expected behavior from @ViewChild. Ultimately, I'm …

dom angular scroll viewchild
@ViewChild returns undefined

For some reason my @ViewChild in my Angular 5 App does not work. I have defined it like this in my …

angular viewchild
error TS2554: Expected 2 arguments, but got 1 with @ViewChild

I was using ViewChild as follows: @ViewChild("InternalMedia") localStream; @ViewChild("emoji") mEmoji; Which was working fine till angular-7.x as …

angular typescript angular7 viewchild angular8
Calling renderRows() on Angular Material Table

I'm trying to get my Angular Table to refresh after updating the data used in the table. The docs say "…

angular methods angular-material viewchild
How can I get children elements from QueryList in Angular 2?

I am newbie at Angular2. In my view I have few identical children that are generated in *ngFor. <ngb-panel *…

angular viewchild
Use ViewChild for dynamic elements - Angular 2 & ionic 2

I want use multiple IonicSlides that I added thease dynamically, So I can't use viewChild . please suggest a way for …

javascript angular ionic2 viewchild
Unit testing angular 5 component with @ViewChild

I am using angular 5.2.0. I have a child component import { Component } from '@angular/core'; @Component({ template: `<div>&…

angular unit-testing viewchild testbed