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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.