Skip to content

Commit ba262f9

Browse files
Martin Fieldjamesdaily
Martin Field
authored andcommitted
docs($compile): Explain that post-link functions run in reverse order.
Update the $compile docs to mention the change introduced in angular#4266. Closes angular#4843
1 parent 4e77014 commit ba262f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ng/compile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@
115115
* When there are multiple directives defined on a single DOM element, sometimes it
116116
* is necessary to specify the order in which the directives are applied. The `priority` is used
117117
* to sort the directives before their `compile` functions get called. Priority is defined as a
118-
* number. Directives with greater numerical `priority` are compiled first. The order of directives with
119-
* the same priority is undefined. The default priority is `0`.
118+
* number. Directives with greater numerical `priority` are compiled first. Pre-link functions
119+
* are also run in priority order, but post-link functions are run in reverse order. The order
120+
* of directives with the same priority is undefined. The default priority is `0`.
120121
*
121122
* #### `terminal`
122123
* If set to true then the current `priority` will be the last set of directives

0 commit comments

Comments
 (0)