Linking function executes bottom up?

75 views
Skip to first unread message

Eddie

unread,
May 25, 2012, 7:21:05 PM5/25/12
to ang...@googlegroups.com
Example at http://jsfiddle.net/ADukg/183/

For the structure 
    <div parent-directive>
        <div child-directive></div>
         <div child-directive></div>
    </div>

I see childs are linked then parent is linked. I always thought it happens top down but I guess I'm wrong?

Eddie

unread,
May 25, 2012, 8:08:11 PM5/25/12
to ang...@googlegroups.com
Looks like pre-linking is top down. post linking (the default) is bottom up.

I ended up using controller for the directive to setup the $scope instead of the linking function.

Igor Minar

unread,
May 26, 2012, 12:54:01 AM5/26/12
to ang...@googlegroups.com
compile fns execute top-to-bottom
pre-linking fn executes top-to-bottom
linking fn (post-linking fn) executes bottom-up


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/XR8qafWK7LsJ.

To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

Reply all
Reply to author
Forward
0 new messages