【问题标题】:Cannot read property 'split' of undefined in ionic image upload无法读取离子图像上传中未定义的属性“拆分”
【发布时间】:2018-08-14 12:16:16
【问题描述】:

我尝试在浏览器中测试我的离子图像上传应用程序,但由于屏幕上显示了cordova_not_available,我无法上传图像,每次我点击上传按钮时都会弹出此错误无法读取属性'split ' 的未定义

在我的 upload.ts 我有这个

let filename = this.imagePath.split('/').pop();

【问题讨论】:

    标签: typescript ionic-framework ionic2


    【解决方案1】:

    这可能是因为您的变量 this.imagePath 为 null 或为空...您如何获得值?

    【讨论】:

      猜你喜欢
      • 2019-01-20
      • 1970-01-01
      • 2018-06-01
      • 2015-07-04
      • 1970-01-01
      • 2022-01-18
      • 1970-01-01
      • 2019-02-26
      • 1970-01-01
      相关资源
      最近更新 更多