Reputation: 123
I am trying to build a reusable tooltip directive with the Angular CDK. Here is a simple demo implementation: https://stackblitz.com/edit/ng-cooltips
However, I cannot get my positioning to work correctly. The angular cdk overlay container does open below the target element, and positioning it relative to the directives host element does not work. What am I missing here?
Upvotes: 1
Views: 2059
Reputation: 31
You just need to add this : @import "../node_modules/@angular/material/prebuilt-themes/indigo-pink.css"; to your style.css and it will fix the issue
Upvotes: 1
Reputation: 14948
You probably missing the overlaycss import from CDK :
@import "~@angular/cdk/overlay-prebuilt.css";
Whitout it , your positionning won't work correctly.
Upvotes: 2