ionic 2 - inappbrowser “browser.on(…).subscribe is not a function” error

自古美人都是妖i 提交于 2019-12-05 08:30:27

InAppBrowser is a cordova plugin, and because of that, it's not available when running the app in the browser with ionic serve.

Try to run the app on a simulator / real device to use the plugin.

If you want to avoid this error you have 3 options:

  1. Run the app in a real device.
  2. Run the app in an emulator.
  3. Run the app in a browser, using the "Browser" platform (which is supported by the InAppBrowser plugin). Instead of doing:

    ionic serve

do:

ionic cordova run browser
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!