Questions tagged as 'viewchild'

2
answers

Angular2 ViewChild does not reference child elements within a ngIf

I have the following problem in a component, I need to access a child element within the component but this being within a *ngIf when the component is initialized gives me an invalid reference or undefined as I can solve this probl...
asked by 13.04.2018 / 17:12
2
answers

@Viewchild Angular 5, 6 - ElementRef

I am referencing a control using ElementRef and for this I use the following: @ViewChild('btnGuardarDatosGenerales') btnGuardarDatosGenerales: ElementRef; I need the reference to be able to reach your click () event, with javascript I can...
asked by 08.08.2018 / 21:37