Top "Viewchild" questions

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

Angular 2+: Get child element of @ViewChild()

How can I access the child elements (here: <img>) of @ViewChild() in Angular 2+ without explicit declaration? In template.…

angular angular-components viewchild
Angular6 @ViewChild undefined with ngIf

I've a problem using @ViewChild with a component showed through ngIf. I found various solutions but no one usefull for …

angular viewchild
Cannot read property 'native-element' of undefined Angular 8

after my angular application versions upgrade from angular 7 to angular 8 i run into a complication problem with rows like this …

angular viewchild angular8
Angular 4 cannot find name 'ViewChild'

I have this strange error and didn't find anything similar to it .. I'm using ng2-canvas-whiteboard component for a drawing …

angular find viewchild
Access nth child of ViewChildren Querylist (Angular)

I'm trying to access the nth child of a viewchildren querylist. Below is my TS: @ViewChildren(PopoverDirective) popovers: QueryList<…

angular viewchild
ngx-datatable - custom columns with action buttons

I have a table (ngx-datatable) in which I want to define an "actions" column in which buttons will then be …

angular angular-material ngx-datatable viewchild ng-template
Angular 2 @ViewChild not working. Cannot Read Property "title" of Undefined

I am unable to access the property of component even after importing with @ViewChild. Below is the code. header.monitor.…

angular typescript viewchild
How viewChild can get elements that added with js in angular2?

If a HTML element has been added to the DOM(for example after click on button), How can we access …

typescript angular datatables viewchild
child parent communication best practices in Angular

I'm trying to become better at Angular and I want to know the best practices between child-parent communication. My current …

angular angular6 viewchild
getting 'nativeElement.querySelector is not a function' exception in Angular2

I'm trying to access a div in Angular2 like below: import { Component, ViewChild, ElementRef, AfterContentInit } from '@angular/core'; @Component({ …

angular angular-universal viewchild