如何使用Angular 6选择文件夹路径

时间:2019-01-30 17:26:54

标签: html5 angular6

我正在尝试选择文件夹路径字符串。我没有尝试上传任何东西,只是能够捕获路径。 使用此方法总是尝试打开文件:

<input id="folder-input" #folderRef type="file" directory />

伴随着风险,这是不可能的,是吧!

1 个答案:

答案 0 :(得分:0)

如果用角度应用程序包装电子,则有可能。 电子瞄准并包装了铬网浏览器。

How to open an Electron dialog from angular 2 component?

参考文献:
https://jaketrent.com/post/select-directory-in-electron/
https://alligator.io/angular/electron/