We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When the app load a page where a tooltip directive is used, the following error happens:
tooltip
Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[Tooltip -> TooltipController]: StaticInjectorError(Platform: core)[Tooltip -> TooltipController]: NullInjectorError: No provider for TooltipController!
I suspect I'm doing something wrong but I cannot identify what it is. Having a look at the example project didn't help me to sort out this.
Thanks for help!
To Reproduce
npm i ionic-tooltips@3 --save
import { TooltipsModule } from 'ionic-tooltips'; ... imports: [ ... IonicModule.forRoot(MyApp), TooltipsModule, ...
... <img tooltip='sample text' [event]='hover'/> ...
Expected behavior When the app is run and the page is displayed, the text "sample text" is displayed if I move the mouse cursor on the image
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
UPDATE
If I add TooltipController to the list of providers in app.module.ts, the error goes away:
TooltipController
app.module.ts
import { TooltipsModule, TooltipController } from 'ionic-tooltips'; ... imports: [ ... IonicModule.forRoot(MyApp), TooltipsModule, ... ], providers: [ ... TooltipController, ... ]
Why is this not present in the example project?
Sorry, something went wrong.
You need to import it in your app.module.ts as TooltipsModule.forRoot()
TooltipsModule.forRoot()
thanks @ihadeed for this, if it is the fix indeed it should be applied to the example project too, right?
No branches or pull requests
Describe the bug
When the app load a page where a
tooltip
directive is used, the following error happens:I suspect I'm doing something wrong but I cannot identify what it is. Having a look at the example project didn't help me to sort out this.
Thanks for help!
To Reproduce
npm i ionic-tooltips@3 --save
tooltip
directive on any html element of the page:Expected behavior
When the app is run and the page is displayed, the text "sample text" is displayed if I move the mouse cursor on the image
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: