To my understanding, setting terminal
to true will result in that directive being executed last, and any directives with a greater priority will execute before it (naturally), and any directive with a lower priority will not execute at all.
However, when using a custom directive with a built-in directive, it seems that this behavior is switched. Let's say we use a custom directive with ng-repeat, unless the custom directive has a priority of less than 1000 (which is ng-repeat's priority), it will NOT execute.
here is a JSFiddle representing my question: http://jsfiddle.net/codef0rmer/aNCY3/
In reference to the JSFiddle code, with custom-directives only(first
, second
): As long as first
has a priority of 2 or higher, it will execute before second
. If it has a priority higher than 2, it will not execute.
With custom-directives in conjunction with a built-in directive (noEntry
, ngRepeat
): Since ngRepeat
has a priority of 1000, if noEntry
has a priority of 1000 or higher, it will NOT execute, however, it will execute with a lower priority than 1000.