Last week, a colleague asked me if there is a way to control the order in which your Angular.js Directives get executed.
Of course you can! Every directive has a ‘priority’ property. When there are multiple directives defined on a single DOM, the priority is used to sort the directives before their compile functions get called. Directives with greater numerical priority are compiled first. The default priority is 0.
An example: