No provider for BrowserTab


#1

I am trying to use BrowserTab plugin describes https://ionicframework.com/docs/native/browser-tab/, But i am getting this error,

Runtime Error
Uncaught (in promise): Error: No provider for BrowserTab! Error at d (http://localhost:8100/build/polyfills.js:3:3991) at injectionError (http://localhost:8100/build/main.js:1509:86) at noProviderError (http://localhost:8100/build/main.js:1547:12) at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/main.js:3048:19) at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/main.js:3087:25) at ReflectiveInjector_._getByKey (http://localhost:8100/build/main.js:3019:25) at ReflectiveInjector_.get (http://localhost:8100/build/main.js:2888:21) at AppModuleInjector.NgModuleInjector.get (http://localhost:8100/build/main.js:3835:52) at resolveDep (http://localhost:8100/build/main.js:11208:45) at createClass (http://localhost:8100/build/main.js:11069:91) at createDirectiveInstance (http://localhost:8100/build/main.js:10905:37) at createViewNodes (http://localhost:8100/build/main.js:12255:49) at createRootView (http://localhost:8100/build/main.js:12160:5) at callWithDebugContext (http://localhost:8100/build/main.js:13291:42) at Object.debugCreateRootView [as createRootView] (http://localhost:8100/build/main.js:12752:12)

and this is the full stack trace,

Error: Uncaught (in promise): Error: No provider for BrowserTab!
Error
    at d (http://localhost:8100/build/polyfills.js:3:3991)
    at injectionError (http://localhost:8100/build/main.js:1509:86)
    at noProviderError (http://localhost:8100/build/main.js:1547:12)
    at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/main.js:3048:19)
    at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/main.js:3087:25)
    at ReflectiveInjector_._getByKey (http://localhost:8100/build/main.js:3019:25)
    at ReflectiveInjector_.get (http://localhost:8100/build/main.js:2888:21)
    at AppModuleInjector.NgModuleInjector.get (http://localhost:8100/build/main.js:3835:52)
    at resolveDep (http://localhost:8100/build/main.js:11208:45)
    at createClass (http://localhost:8100/build/main.js:11069:91)
    at createDirectiveInstance (http://localhost:8100/build/main.js:10905:37)
    at createViewNodes (http://localhost:8100/build/main.js:12255:49)
    at createRootView (http://localhost:8100/build/main.js:12160:5)
    at callWithDebugContext (http://localhost:8100/build/main.js:13291:42)
    at Object.debugCreateRootView [as createRootView] (http://localhost:8100/build/main.js:12752:12)
    at d (http://localhost:8100/build/polyfills.js:3:3991)
    at l (http://localhost:8100/build/polyfills.js:3:3244)
    at Object.reject (http://localhost:8100/build/polyfills.js:3:2600)
    at Tab.NavControllerBase._fireError (http://localhost:8100/build/main.js:43469:16)
    at Tab.NavControllerBase._failed (http://localhost:8100/build/main.js:43457:14)
    at http://localhost:8100/build/main.js:43512:59
    at t.invoke (http://localhost:8100/build/polyfills.js:3:11562)
    at Object.onInvoke (http://localhost:8100/build/main.js:4403:37)
    at t.invoke (http://localhost:8100/build/polyfills.js:3:11502)
    at n.run (http://localhost:8100/build/polyfills.js:3:6468)
    at http://localhost:8100/build/polyfills.js:3:3767
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:12256)
    at Object.onInvokeTask (http://localhost:8100/build/main.js:4394:37)
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:12177)
    at n.runTask (http://localhost:8100/build/polyfills.js:3:7153)

Any help ?


#2

try to put it into your app.module.ts in providers.

providers: [ BrowserTab ]