【问题标题】:ionic serve not working with 'in app browser' plugin离子服务不适用于“应用内浏览器”插件
【发布时间】:2021-12-03 15:26:24
【问题描述】:

当尝试使用插件“cordova-plugin-inappbrowser”时,离子服务不起作用

[ERROR] ng has unexpectedly closed (exit code 1).

    The Ionic CLI will exit. Please check any output above for error
    details.

这是我的代码:

import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';

export class NoticeComponent {

  @Input() notice: Article;

  target: string = '_system';

  constructor(private inAppBrowser: InAppBrowser) { }

  openNotice(){
    this.inAppBrowser.create(this.notice.url, this.target);
  }
}

尝试删除节点模块并重新安装它们但不起作用

【问题讨论】:

  • 您是否在控制台中获得任何信息。请注意,cordova 插件在 ionic serve 中不起作用

标签: angular ionic-framework inappbrowser


【解决方案1】:

运行以下命令:

npm install @ionic/app-scripts@latest --save-dev

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-12
    • 1970-01-01
    • 2016-03-01
    • 1970-01-01
    相关资源
    最近更新 更多