O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Value converters

As we explained before coming across this topic, user interface elements in Aurelia are composed of two files: view and view model pairs. The view is written in pure HTML and is rendered into the DOM. The view model is written in JavaScript and provides data and behavior to the view. Aurelia links the two files together, as one single element using its powerful data binding engine, allowing changes in your view model to be reflected in the view and vice versa. Sometimes the data showed by your view model is not in a good or understandable format for displaying in the UI. Dealing with date and numeric values are the most common scenarios:

export class Example {    constructor() {    this.showRawData();  }  showRawData() {    this.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required