In fact, all directives are executed, you can adjust the order of execution using priority paramenter
A priority:
When there are several directives defined for a single DOM element, it is sometimes necessary to specify the order in which the directives are applied. Priority is used to sort directives before calling compilation functions. Priority is defined as a number. First, directives with a high numerical priority are set. Prelink functions are also performed in priority order, but post link functions are performed in reverse order. The order of directives with the same priority is undefined. The default priority is 0.
And you can also tell angular to stop directory digesting in the current element whenever you find a directive with the terminal parameter set to true
https://docs.angularjs.org/api/ng/service/$compile
However, the solution to the problem of creating priorities is a bit more complicated, so I will stick with @nico soluction
and also, here is plunker to verify that angular does both
http://plnkr.co/edit/e66I71UKp5mnurcjVzN4
source share