【发布时间】:2017-02-02 14:06:11
【问题描述】:
当用户单击 Ionic ActionSheet 中的按钮时,我正在尝试在我的 ionic 应用程序中打开文件资源管理器。这可以通过将<input type="file"> 放入 HTML 模板中简单地完成。但我在操作表中给出了两个选项
- 打开相机
- 打开文件资源管理器
我使用
$cordovaCamera插件打开相机,但我不知道如何打开文件探索。这是我的代码供参考
$ionicActionSheet.show({
buttons: [{ text: 'Open File Explorer //or <input type="file">' },
{ text: 'Open Camera' }],
buttonClicked: function(buttons) {
if(buttons == 0)
{
// what to do here ?
return true;
}
if(buttons == 1)
{
$scope.takeImage(Camera.PictureSourceType.CAMERA);
return true;
}}
})
【问题讨论】:
标签: javascript angularjs node.js cordova ionic-framework