I understand that the link method should work in directives, so that the functions of the post link are called in the reverse order. That is, the functions of internal links inside most elements are 'called before external elements'. There are tons of plunkers demonstrating this behavior online.
However, I do not understand the behavior that I see in this plunker . An external link is a function called the first. The behavior changes if I do not use it templateURlin an internal directive, which makes things even weirder!
Can someone explain this?
Edit
I found another post that asks the same question. From the answer (which of the documents):
templateUrl - Same as template, but the template is loaded from the specified URL. Since loading a template is asynchronous, compilation / binding is suspended until the template is loaded.
Comment in the added topic:
If you have directives that depend on each other, you cannot count on the order of execution. You will need to change your design to work within the limits of the framework. If you update your post with more details on what you are really trying to accomplish, we can probably help you redesign your directives.
So there it is.
My specific case
. , , . , , :
<div class="field">
<label class="label">{{label}}</label>
<div class="input">
<div class="ui selection fluid dropdown">
<i class="ui dropdown icon"></i>
<div class="default text">{{default}}</div>
<div class="menu">
<div class="item" ng-repeat="item in collection" data-value="{{item[value]}}">
{{item[identifier]}}
</div>
</div>
<input name="{{name}}" type="hidden" ng-required='{{required}}'/>
</div>
</div>
</div>
, - . . , , , , , , . , , .
html :
<form error-directive>
<choice name="myInput" label="MyLabel" default="Select an Item" collection="data" value="id" identifier="text" ng-model="myModel" required="true"></choice>
</form>
?