When there are multiple directives across multiple elements on a page, how does Angular\'s HTML compiler arrange the order for compiling?
Say I have the following ma
Regarding multiple directives on one element:
This is handled using the directive 'priority' property. From the docs: Once all directives for a given DOM element have been identified they are sorted by priority and their compile() functions are executed.
See http://docs.angularjs.org/guide/directive
Regarding directive compile order:
Angular will traverse the DOM - i.e. pick up the elements in the order they appear in the DOM tree. From the docs: Compile: traverse the DOM and collect all of the directives. The result is a linking function.
See http://docs.angularjs.org/guide/compiler