I have a tooltip (http://angular-ui.github.io/bootstrap/) with a status notification, but when this notifications is to large, it overflows the screen limits. here is a print of what is happening:
I couldn't find any attribute in angular ui that deals with this problem.
thanks in advance!
I suspect the popover is inheriting some positioning information from the container it's in. Try setting
popover-append-to-body
so that it's not in that container any longer.There is a bug in the current release of Angular UI, so you actually have to set:
But, that will be fixed on the next release so you don't need the ="true" part, just set the attribute.
This solution does not use Angular-UI, just Angular and Bootstrap. Bootstrap is not necessarily required, just simplifies the process a bit:
http://plnkr.co/edit/jLThSTrLUapAG8OLW44m?p=preview
Before I go any further, an alternative to this example would be to add a CSS class with word-wrap and white-space properties to your tooltip class. Using Chrome or Firefox's developer tool, inspect the elements until you locate the classes responsible for setting the tooltip ui; then add these properties to them in your style.css custom CSS document.
Now, for this particular solution, we create a tooltip directive and allow it to take a placement attribute to determine positioning
Angular code, where we destroy the tooltip after we are done to prevent a memory leak:
CSS Code, where we have to override some of the Bootstrap defaults: