Why is the post link function executed before the transcluded child link functions?
问题 The timing of (pre/post)link functions in AngularJS are well defined in the documentation Pre-linking function Executed before the child elements are linked. Not safe to do DOM transformation since the compiler linking function will fail to locate the correct elements for linking. Post-linking function Executed after the child elements are linked . It is safe to do DOM transformation in the post-linking function. and this blog post clearly illustrates this expected order. But this order does