Want to open the standard file open dialog when clicking follow button in the .component.html:
<button md-fab md-tooltip="Input">
<md-icon class="md-24">input</md-icon>
</button>
seems the common way to open a dialog is to use input tag like this:
<input type=”file”>
but it shows extra things on screen. Thinking of do popping up in the .component.ts with a (click) in the :
<button md-fab md-tooltip="Input" (click)="onClick()">
<md-icon class="md-24">input</md-icon>
</button
but couldn't find a way to pop up file open dialog in .ts, please help.
@angular/cli: 1.0.1 node: 7.7.4 os: win32 x64 @angular/xxxx: 4.0.3
It seems you are using angular material. Have you tried to follow this example? https://material.angular.io/components/component/dialog. Current code is taken directly from the example in the link. in the html:
And in the .ts file: