Skip to content
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

Tooltip is not showing up. #366

Closed
1busby opened this issue Sep 5, 2017 · 6 comments
Closed

Tooltip is not showing up. #366

1busby opened this issue Sep 5, 2017 · 6 comments

Comments

@1busby
Copy link

1busby commented Sep 5, 2017

I'm trying to get tooltips to show but I'm not having any luck. I even just tried copying and pasting from the sample page.

  <a materialize="tooltip" (click)="printSomething()" class="btn tooltipped" data-position="bottom" data-delay="10" data-tooltip="I am tooltip">Hover me!</a>

No tooltip shows up

@tramel-woodard
Copy link

@mbusbyHub I just imported your materialize anchor into a project of mine and rebuilt it. Works perfectly on my end. Are all of your other material directives working fine?

@1busby
Copy link
Author

1busby commented Sep 8, 2017

The other components I've been using are working. This tooltip just doesn't want to budge. I made a fresh angular app and tried it and it wont pop up:
https://github.com/mbusbyHub/tooltest

@tramel-woodard
Copy link

tramel-woodard commented Sep 8, 2017

@mbusbyHub I noticed you're still referencing the materialize.min.js from your src/index.html file. If you need to reference this on your index.html for it to work, this usually means your angular2-materialize MaterializeModule is not properly configured.

I know you stated that the other components you're using are working. In Materialize, components can loosely reference 1) class styles (<img class="img-responsive" />), or 2) actual Materialize directives (<a materialize="tooltip"></a>). Are the other components you're using so far (that work) classes or actual directives?

If they're classes, then it's just a matter of properly configuring Materialize for your angular-cli project. If you're already successfully using other Material directives (like materialize="tooltip") and this particular one is just not working, then we'll need to figure out something else.

In the meantime, maybe you can go down a checklist I wrote for angular-cli when it was called angular2-webpack-starter: #338 . If you've never used a Materialize directive (and just classes) so far, then I'd definitely be interested in seeing this work also, as most of my MEAN projects are using the older version.

Let us know how it goes.

@1busby
Copy link
Author

1busby commented Sep 8, 2017

Thank you! I'm new to angular, and web dev in general so I've been completely baffled by all the issues I'm having. I removed the min.js an min.css from index and the tooltip is now working, as well as a couple other strange issues being resolved .
Cheers!

@1busby 1busby closed this as completed Sep 8, 2017
@rubyboy
Copy link
Contributor

rubyboy commented Sep 9, 2017

@tramel-woodard thanks heaps for helping out here!

@tramel-woodard
Copy link

@rubyboy my pleasure, this module is a lifesaver for several of my projects. I hope more Angular devs start modularizing and encapsulating their Materialize code also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants