I've written a custom tooltip directive that requires a shared controller function to pass the data between the elements that get the tooltip and the tooltip div itself. So I've got a "tooltipCtrl" directive which I place on the container div, and then a "tooltip" directive that I put on elements that should get the tooltip on mouseover, and a "tooltipDiv" directive that I place on the element that actually gets the tooltip. Both tooltip and tooltipDiv have "require:'^tooltipCtrl'" in their definition. It's probably the wrong way to do this, but it seems to get the job done.
Unfortunately when I tried to use the directive in a custom cellTemplate for ng-grid, I get this error:
Error: [$compile:ctreq] Controller 'tooltipCtrl', required by directive 'tooltip', can't be found!
Here's the template definition:
<div tooltip="cell" class="ngCellText"><span ng-cell-text>{{row.getProperty(col.field)}}</span></div>
This doesn't happen when I use the template outside of ng-grid. Is ng-grid doing something odd when it compiles the template such that it can't find the directive on the parent element?
Here's the whole thing in a plunker: http://plnkr.co/edit/wP1cnhJGiYLP49695RKD
Thanks for any guidance!