como acessar um elementRef de um componente

The solution for “como acessar um elementRef de um componente” can be found here. The following code will assist you in solving the problem.

@ViewChild(‘FileDialog’) FileDialog: ElementRef;

open_dialog() {
const e: HTMLElement = this.FileDialog.nativeElement;;

//no html criei a variavel FileDialog tbm

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in