February 2019
Beginner
694 pages
18h 4m
English
Aurelia combines controllers and models into a single class structure. This means that a standard TypeScript class acts as a controllers, and its properties act as its model. All Aurelia classes are built on the ECMAScript 2016 standard, meaning that there are no getters and setters as we needed in Backbone, nor are there any special constructors required to hydrate the model. Classes can contain other classes, and therefore it is very easy to define complex and nested models. Let's modify the src/app.ts file as follows:
interface IClickableItem { DisplayName: string; Id: number; } export class App { Title = 'Please select :'; SelectedItem: IClickableItem = { Id: 0, DisplayName: "None selected" }; items: IClickableItem[] ...Read now
Unlock full access