Complete Getting Started Guide

Complete getting started guide for Aurelia 2 - from installation to building your first interactive application in 15 minutes.

Build a real Aurelia application in 15 minutes. This hands-on guide shows you why developers choose Aurelia for its performance, simplicity, and standards-based approach. No prior Aurelia experience required.

What You'll Discover

Build a polished task management app while experiencing Aurelia's key advantages:

  • 🚀 Instant two-way data binding - no boilerplate code required

  • ⚡ Blazing fast rendering - direct DOM updates, no virtual DOM overhead

  • 🎯 Intuitive component model - clean, testable architecture

  • 🛠️ Modern TypeScript development - with built-in dependency injection

The result? A production-quality app with clean, maintainable code in just 15 minutes.

Prerequisites

You'll need:

  • Node.js 18+ (recommended latest LTS) (Download here)

  • A code editor (VS Code recommended)

  • Basic knowledge of HTML, CSS, and JavaScript

Quick Try (No Installation)

Want to see Aurelia in action immediately? Copy this into an HTML file:

Open it in your browser and start typing! This demonstrates Aurelia's automatic two-way data binding.

Create Your First Project

Step 1: Initialize Project

Create a new project using the makes command:

When prompted:

  • Project name: my-task-app

  • Choose TypeScript or JavaScript template (TypeScript recommended)

  • Install dependencies: Yes

Your app opens at http://localhost:9000 showing "Hello World!"

Step 2: Project Structure

Your new project contains:

Key files to understand:

  • main.ts: Starts your Aurelia application

  • my-app.ts: Your root component's logic (TypeScript)

  • my-app.html: Your root component's template (HTML)

Understanding Aurelia Components

Aurelia apps are built with components. Each component has two parts:

View-Model (Logic)

src/my-app.ts:

View (Template)

src/my-app.html:

The ${} syntax binds data from your view-model to the template. When message changes, the <h1> automatically updates!

Build Your Task App

Let's transform the hello world app into a task manager. We'll build it step by step.

Step 3: Update the Template

Replace contents of src/my-app.html:

Step 4: Update the Logic

Replace contents of src/my-app.ts:

Step 5: Add Styles

Replace contents of src/my-app.css:

Step 6: See It Work!

Save your files and check your browser. You now have a fully functional task manager! Try:

  • Adding tasks by typing and clicking "Add Task" or pressing Enter

  • Completing tasks by checking the checkboxes

  • Removing tasks by clicking the × button

  • Watching the counters update automatically

Key Concepts You Just Learned

1. Data Binding

Aurelia automatically keeps your HTML in sync with your TypeScript properties.

2. Event Handling

Connect user interactions to your methods seamlessly.

3. Conditional Rendering

Show or hide elements based on conditions.

4. List Rendering

Display dynamic lists that update automatically.

5. Computed Properties

Derived values that update automatically when dependencies change.

Next Steps

Congratulations! You've built a real Aurelia application. Here's what to explore next:

Immediate Next Steps

Building Real Apps

Development Workflow

Common Questions

"Should I use TypeScript or JavaScript?"

TypeScript is recommended for better development experience, error catching, and IntelliSense. But JavaScript works perfectly fine too.

"How does this compare to React/Vue/Angular?"

Aurelia focuses on standards-based development with minimal learning curve. If you know HTML, CSS, and JavaScript, you already know most of Aurelia.

"Can I use this in production?"

Absolutely! Aurelia 2 is production-ready and used by companies worldwide. The framework is stable, performant, and well-tested.

"What if I get stuck?"

You're Ready!

You now understand Aurelia's core concepts and have built a working application. The framework's strength lies in its simplicity - what you just learned covers 80% of what you'll use in real applications.

Ready to build something amazing? Dive into the guides above or start building your next project with Aurelia!

Last updated

Was this helpful?