I have a weird situation. If I have an outer directive that contains 2 directives
inner-directive1 - has a template defined.
inner-directive2 - has a templateUrl defined.
The inner-directive1 postLink function is being called before the outer-directive postLink function - as expected.
But, the inner-directive2 poslink function is being called after the outer-directive postLink - NOT as expected.
The calls to the postLink function are : inner-directive1, outer-directive, inner-directive2 and I was expecting : inner-directive1, inner-directive2, outer-directive.
The template for the outer directive is:
<div ng-transclude><div inner1></div><div inner2></div></div>
please look at the JsFiddle
Does anyone know the reason why? And is there a way I can make it work as it is expected ?
JSFiddle - Please look at the console log. Thanks, Ben