I have created a directive that, given the required data, will produce an input field with validation rules, validation messages and an angular-strap Tooltip.
I would like the tooltip to align with the form row so that, even when validation errors hide and show, the tooltip always aligns with the input.
To achieve this I have set the container of the tooltip to the element of the directive.
scope.elementData.Tooltip = {
"title": scope.elementData['Help Text'],
"container": element // <<<<<<<<<
}
However - I get the following error:
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Oddly the tooltip is now placed inside the container, fixing the issue, but there are nasty console errors as above.
See a working example here: http://plnkr.co/bdH4xcUKmWTocVlEWLtI?p=preview.
If anyone could help in figuring out the cause of the $digest error I would be most grateful. I have found this How to Troubleshoot Angular "10 $digest() iterations reached" Error but I can't quite see how this relates to the issues described there. Again any help would be much appreciated.