Yeah, I'd say that's probably the situation. If the tooltips are being
added dynamically in a later digest cycle as a result of an ng-repeat or
ng-include, I'm pretty sure the table's postLink and controllers will both
fire off first.

It's something of a hack, but you could always do something like have the
child elements call fireTooltip on the parent controller when they're
instantiated (you can include a parent controller in a link if you do a
require in the child directive's definition). fireTooltip could do
something asynchronous - store a promise for a $timeout(function(){"update
tooltips here"}, 500), and return right away. If the promise already
exists, don't do anything, since it'll fire anyway (or add that tooltip to
the list of elements to batch-update if you're being fancy).

e


On Mon, Aug 18, 2014 at 11:18 AM, alycklama <[email protected]> wrote:

> That's exactly what I thought, but unfortunately it is not working.
>
> table - controller
> table - preLink
> table - postLink
> tooltip - controller
> tooltip - preLink
> tooltip - postLink
>
> I would have expected the output below:
>
> table - controller
> tooltip - controller
> table - preLink
> tooltip - preLink
> tooltip - postLink
> table - postLink
>
> I forgot to mention that in my first directive I load a template. In this
> template I load via a ng-repeater the tooltip directive.
>
> Maybe this causes the above behavior?
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to