Several directives in Angular UI Bootstrap have an append-to-body
option. When would I need to use this and what are the advantages and disadvantages to it?
That's a very useful option.
That option changes parent of any tooltips etc. elements that as usual dynamicly added into your HTML. To prevent some edges collisions or mixing CSS rules.
You will need to use that option when for example your tooltips are cut by parent edges (parent has overflow:hidden). When using that append-to-body option tooltip will be appended to body instead of that overflow:hidden parent and will not be cut.
Quick solution for such often happening issue.
I have found such options useful because otherwise the markup would be inserted as a sibling or child of the triggering element, which may not be ideal.
Possible reasons why:
<div>
as a child of a <tr>
).position: fixed
, which does not scroll with the page).There are probably other reasons, but I suspect that the last one is the most common.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With