【问题标题】:Fork plugin IonicFork 插件 Ionic
【发布时间】:2019-04-16 06:49:25
【问题描述】:

我想分叉条形码扫描器插件来做一个自定义的相机覆盖并在我的应用程序中使用它,但我不知道如何正确地做到这一点。

这些是我的步骤...

1 - 我下载了

的 master 分支

https://github.com/phonegap/phonegap-plugin-barcodescanner

2 - 我将它复制粘贴到插件文件夹中

3 - 我像这样将它添加到项目中。

ionic Cordova 插件添加 'plugins/custom-barcodescanner'

4 - 我将它导入我的 app.module.ts

从 '../../plugins/custom-barcodescanner' 导入 { BarcodeScanner };

结果:找不到模块.....custom-barcodescanner'

感谢您的帮助。

【问题讨论】:

    标签: cordova ionic-framework ionic3 cordova-plugins


    【解决方案1】:

    您应该将插件添加到项目所在的不同文件夹中,然后将其添加为本地插件。可以这样做:

    ionic cordova plugin add /path/to/pluginfolder
    

    另一种方法是在 github 上 fork 插件并将您的更改添加到您的 github fork。然后将此存储库添加为插件:

    ionic cordova plugin add https://github.com/path/to/your/fork
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-12
      • 2017-08-06
      • 2018-06-03
      • 2020-03-14
      • 2018-08-02
      • 1970-01-01
      • 1970-01-01
      • 2019-12-01
      相关资源
      最近更新 更多