Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

como acessar um elementRef de um componente

@ViewChild('FileDialog') FileDialog: ElementRef;

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

//no html criei a variavel FileDialog tbm
 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #como #acessar #um #elementRef #de #um #componente
ADD COMMENT
Topic
Name
2+2 =