Aurelia Tutorial
Aurelia Useful Resources
Selected Reading
- Aurelia - Best Practices
- Aurelia - Community
- Aurelia - Debugging
- Aurelia - Bundling
- Aurelia - Tools
- Aurelia - Localization
- Aurelia - Dialog
- Aurelia - Animations
- Aurelia - History
- Aurelia - Routing
- Aurelia - Refs
- Aurelia - HTTP
- Aurelia - Forms
- Aurelia - Event Aggregator
- Aurelia - Events
- Aurelia - Converters
- Aurelia - Binding Behavior
- Aurelia - Data Binding
- Aurelia - Plugins
- Aurelia - Configuration
- Aurelia - Dependency Injections
- Aurelia - Custom Elements
- Aurelia - Component Lifecycle
- Aurelia - Components
- Aurelia - First Application
- Aurelia - Environment Setup
- Aurelia - Overview
- Aurelia - Home
Aurelia Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Aurelia - Data Binding
Aurepa - Data Binding
Aurepa has its own data-binding system. In this chapter, you will learn how to bind data with Aurepa, and also explain the different binding mechanics.
Simple Binding
You already saw simple binding in some of our previous chapters. ${...}syntax is used to pnk veiw-model and view.
app.js
export class App { constructor() { this.myData = Welcome to Aurepa app! ; } }
app.html
<template> <h3>${myData}</h3> </template>
Two-Way Binding
The beauty of Aurepa is in its simppcity. The two-way data binding is automatically set, when we bind to input fields
app.js
export class App { constructor() { this.myData = Enter some text! ; } }
app.html
<template> <input id = "name" type = "text" value.bind = "myData" /> <h3>${myData}</h3> </template>
Now, we have our view-model and view pnked. Whenever we enter some text inside the input field, the view will be updated.
Advertisements