Data binding

Aurelia has its own data binding system. Let's explain that with an example.

You know that you need to define a view and a view model file for each Aurelia component. Binding is the process that reflects the view model data into the view, and vice versa. As we said earlier, one of Aurelia's most beautiful features is double-binding framework, so you won't have to worry about updating the data on the view or view model.

Aurelia supports HTML and SVG attributes to JavaScript expressions. The binding attribute declaration is composed of three parts:

attribute.commamnd = "expression"

Let's explain each one:

attribute: Refers to the HTML/SVG attribute we will apply to the binding. For example, one input tag could have defined the ...

Get Hands-On Full Stack Web Development with Aurelia now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.