-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
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
No Provider for MdTooltip #6552
Comments
That's because |
How would I go about programmatically showing or hiding a tooltip then? Is there some example online showing it? |
To get a instance of See this plunker. Oops, I just noticed that the |
It already activates using tap via touch device. You can't use the You can view the demo code for how to programmatically trigger the tooltip here or using the ViewChild example in @rafaelss95 plunker. @rafaelss95 that's because you're using the event click for calling the method show. If you see the demo example it uses the The problem is with the interactions method here.
I'm not sure if there needs to be a way to disable this, because of what the Material spec states?
But I do believe it still should be up to the developer to deviate from the material specs when it's really required. |
@joejordanbrown nice to know the reason why it isn't working :) In fact, what @datrinh wants is something like a popover (issue here). Oops, I just saw that you've published a popover's package. Nice :) |
@rafaelss95 Yes, maybe a popover is more appropriate. haha yes, that's correct, it's still very much a WIP, waiting for the full |
OK, following situation: I don't really need a popover with carets or anything. Pretty much the style of the tooltip with showing and hiding is what I need. Am i better off building my own component for it? |
Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc. |
@jelbourn @crisbeto this is a valid issue that should be answered by a team member if it's the intended purpose to strictly prohibit activation of the popover using other events that will automatically initiate the If you read my comments above I go into detail about why it doesn't allow all types of events to trigger |
Fixes the tooltip being closed immediately if it is opened as a result of a click. It seems like the logic that was supposed to handle this in master fires before the event has had the chance to bubble up to the body. These changes switch to relying on Angular's animation events to disable the body click. Relates to angular#6552.
@joejordanbrown not being able to open the tooltip on click is definitely a bug. It'll be resolved by #6590. |
Fixes the tooltip being closed immediately if it is opened as a result of a click. It seems like the logic that was supposed to handle this in master fires before the event has had the chance to bubble up to the body. These changes switch to relying on Angular's animation events to disable the body click. Relates to angular#6552.
Fixes the tooltip being closed immediately if it is opened as a result of a click. It seems like the logic that was supposed to handle this in master fires before the event has had the chance to bubble up to the body. These changes switch to relying on Angular's animation events to disable the body click. Relates to #6552.
Fixes the tooltip being closed immediately if it is opened as a result of a click. It seems like the logic that was supposed to handle this in master fires before the event has had the chance to bubble up to the body. These changes switch to relying on Angular's animation events to disable the body click. Relates to angular#6552.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
When I inject the MdTooltip service into a component I get a
No Provider for MdTooltip
error.All other material components I use are working fine. Tooltips work fine too except for the injecting.
What is the expected behavior?
No runtime error.
What is the current behavior?
No Provider for MdTooltip
What are the steps to reproduce?
Create a new ng-cli app and inject MdTooltip.
Example plnkr: http://plnkr.co/edit/UIzqoHLPqWMk2W0H5pRj?p=preview
What is the use-case or motivation for changing an existing behavior?
Using MdTooltip service functions such as
show()
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/cli: 1.3.1
node: 7.6.0
os: darwin x64
@angular/animations: 4.3.5
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.3.5
@angular/compiler: 4.3.5
@angular/core: 4.3.5
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.3.5
@angular/http: 4.3.5
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.3.5
@angular/platform-browser-dynamic: 4.3.5
@angular/router: 4.3.5
@angular/cli: 1.3.1
@angular/compiler-cli: 4.3.5
@angular/language-service: 4.3.5
The text was updated successfully, but these errors were encountered: