Can I expect bindings on a page to be processed with the particular order? For example, in this Gist binding behavior is bound first and the custom attribute second even though it "appears" earlier in markup.
<form my-attribute.bind="attrValue">
<input value.bind="stringValue & myBehavior" />
</form>
No, you cannot rely on the order. The markup is parsed by the browser's HTML parser, resulting in a DOM tree that is inspected by Aurelia's view compiler. Aurelia's view compiler sees the attributes in the order they appear in the DOM (eg element.attributes).
Some DOM implementations store attributes in alphabetical order. Others store them in the order they appear in the markup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With