Ionic 2 Can't resolve all parameters for InAppBrowser

前端 未结 1 946
轻奢々
轻奢々 2021-01-22 16:14

I don\'t understand why I get the following error when I use the native InAppBrowser plugin : Can\'t resolve all parameters for InAppBrowser

import { Component }         


        
相关标签:
1条回答
  • 2021-01-22 17:02

    You don't need to add InAppBrowser to the providers array and you also don't need to inject it in the constructor.

    Simply import it in the beginning of the page (as you did), and then use it anywhere in the code like that:

    openPage() {
      new InAppBrowser('https://google.com', '_system');
    }
    
    0 讨论(0)
提交回复
热议问题