al-attr

A way to set value for attribute/propery of element

Examples
<input al-attr.hidden="value" />
<input :hidden="value" />
<input al-attr.disabled="value" />
<input :disabled="value" />
<img al-attr.src="linkToImage" />
<img :src="linkToImage" />

Style and class:

Examples
<div :class.red="redDiv"></div>
<div :style.border-color="color"></div>
Expression as template
<img al-attr.src.tpl="/server/images/{{id}}" />
<img :src.tpl="/server/images/{{id}}" />

Other attributes/properties

  • :checked
  • :readonly
  • :value
  • :selected
  • :muted
  • :disabled
  • :hidden
  • :style
  • :focus
  • :<any attribute>

al-html/:html