Style Binding

Along with text and values, Atoms.js provides easy way to perform (one way and one time) binding on element style as well. This form of binding allows us to easily split style into different attributes and bind them independently as shown in example below.

We have displayed 2 forms of binding.

style-color is set to #000000 (black) color at time of initialization. This is same as writing in line style, but this helps us in dividing individual style properties.

style-background-color will be set to corresponding item's itemColor property.

style-width will be set to an expression that will add 'px' at the end as required by element style.