Aurelia glossary
Term |
Meaning |
---|---|
Component | Aurelia applications are built by combining various components with distinct roles and responsibilities. Several component types come out of the box, including custom elements and attributes, value converters, binding behaviors, and view-engine hooks. |
View-model | Most components in an Aurelia application include a JavaScript/TypeScript class called a view-model. This class implements your component’s behavior. |
View | Aurelia applications contain one or more views. These are created declaratively with HTML and connected to view-models via data binding. |
Data binding | Data binding allows you to render data from your JavaScript view-model to the DOM and react to DOM events and data updates in your view-model. |
Custom element | Custom elements allow you to encapsulate a UI widget and include it in a view in your SPA. You can use these elements declaratively in your views, just like the standard HTML elements you’re familiar with. |
Custom attribute | Aurelia lets you decorate standard or custom HTML elements to augment their behavior. For example, you could create a date-picker custom attribute to transform a standard input element into a date-picker control. |
Value converter | Value converters allow you to transform data as it moves between your view-model and your view. The stereotypical example is representing dates or currency values based on a user’s location. |
Binding behavior | Binding behaviors let you alter how bindings function. For example, the throttle binding behavior allows you to control the frequency at which binding updates are transmitted from the view to the view-model. |
View-engine hook | These are callbacks present on Aurelia view-models that you can use to enact your own custom behavior at various points in Aurelia’s component lifecycle (for example, after a view has been attached to the DOM). |
Router | Aurelia’s router allows you to load a given component in response to an application route (a URL within your application). For example, you could map /app#/blog to a blog component. Then, when the user visits this URL in their browser, Aurelia would take care of loading the appropriate component and rendering it into the DOM. |