Upgrade from Aurelia 1 to Aurelia 2
The same components before and after: Aurelia 1 on the left, Aurelia 2 on the right. 20 of 20 examples change; removed lines are marked in red, added lines in green.
Reactivity
Declare state Changed
Aurelia 1
<template>
<h1>Hello ${name}</h1>
</template>
Aurelia 2
<h1>Hello ${name}</h1>
Update state Changed
Aurelia 1
<template>
<h1>Hello ${name}</h1>
</template>
Aurelia 2
<h1>Hello ${name}</h1>
Computed state Changed
Aurelia 1
<template>
<div>${doubleCount}</div>
</template>
Aurelia 2
<div>${doubleCount}</div>
Templating
Minimal template Changed
Aurelia 1
<template>
<h1>Hello world</h1>
</template>
Aurelia 2
<h1>Hello world</h1>
Styling Changed
Aurelia 1
.title {
color: red;
}
Aurelia 2
.title {
color: red;
}
Loop Changed
Aurelia 1
<template>
<ul>
<li repeat.for="color of colors">${color}</li>
</ul>
</template>
Aurelia 2
<ul>
<li repeat.for="color of colors">${color}</li>
</ul>
Event click Changed
Aurelia 1
<template>
<p>Counter: ${count}</p>
<button click.trigger="incrementCount()">+1</button>
</template>
Aurelia 2
<p>Counter: ${count}</p>
<button click.trigger="incrementCount">+1</button>
Dom ref Changed
Aurelia 1
<template>
<input ref="inputElement" />
</template>
Aurelia 2
<input ref="inputElement" />
Conditional Changed
Aurelia 1
<template>
<button click.trigger="nextLight()">Next light</button>
<p>Light is: ${light}</p>
<p>
You must
<span if.bind="light === 'red'">STOP</span>
<span if.bind="light === 'orange'">SLOW DOWN</span>
<span if.bind="light === 'green'">GO</span>
</p>
</template>
Aurelia 2
<button click.trigger="nextLight()">Next light</button>
<p>Light is: ${light}</p>
<p switch.bind="light">
You must
<span case="red">STOP</span>
<span case="orange">SLOW DOWN</span>
<span case="green">GO</span>
</p>
Lifecycle
On mount Changed
Aurelia 1
<template>
<p>Page title is: ${pageTitle}</p>
</template>
Aurelia 2
<p>Page title is: ${pageTitle}</p>
On unmount Changed
Aurelia 1
<template>
<p>Current time: ${time}</p>
</template>
Aurelia 2
<p>Current time: ${time}</p>
Component composition
Props Changed
Aurelia 1
<template>
<require from="./user-profile"></require>
<user-profile
name.bind="name"
age.bind="age"
favourite-colors.bind="colors"
is-available.bind="available"
></user-profile>
</template>
Aurelia 2
<user-profile
name.bind
age.bind
favourite-colors.bind="colors"
is-available.bind="available"
></user-profile>
Emit to parent Changed
Aurelia 1
<template>
<require from="./answer-button"></require>
<p>Can I come ?</p>
<answer-button action-handler.call="handleAnswer(reply)"></answer-button>
<p style="font-size: 50px">${isHappy ? "😀" : "😥"}</p>
</template>
Aurelia 2
<p>Can I come ?</p>
<answer-button action-handler.bind="handleAnswer"></answer-button>
<p style="font-size: 50px">${isHappy ? "😀" : "😥"}</p>
Slot Changed
Aurelia 1
<template>
<require from="./funny-button"></require>
<funny-button>Click me !</funny-button>
</template>
Aurelia 2
<funny-button>Click me !</funny-button>
Slot fallback Changed
Aurelia 1
<template>
<require from="./funny-button"></require>
<funny-button></funny-button>
<funny-button>Click me !</funny-button>
</template>
Aurelia 2
<funny-button></funny-button>
<funny-button>Click me !</funny-button>
Context
Aurelia 1
Missing snippet Help us to improve Component Party 
Aurelia 2
<h1>Welcome back, {{ user.username }}</h1>
<user-profile />
Form input
Input text Changed
Aurelia 1
<template>
<p>${text}</p>
<input value.bind="text" />
</template>
Aurelia 2
<p>${text}</p>
<input value.bind />
Checkbox Changed
Aurelia 1
<template>
<input id="is-available" type="checkbox" checked.bind="isAvailable" />
<label for="is-available">Is available</label>: ${isAvailable}
</template>
Aurelia 2
<input id="is-available" type="checkbox" checked.bind="isAvailable" />
<label for="is-available">Is available</label>: ${isAvailable}
Radio Changed
Aurelia 1
<template>
<div>Picked: ${picked}</div>
<input id="blue-pill" checked.bind="picked" type="radio" value="blue" />
<label for="blue-pill">Blue pill</label>
<input id="red-pill" checked.bind="picked" type="radio" value="red" />
<label for="red-pill">Red pill</label>
</template>
Aurelia 2
<div>Picked: ${picked}</div>
<input id="blue-pill" checked.bind="picked" type="radio" value="blue" />
<label for="blue-pill">Blue pill</label>
<input id="red-pill" checked.bind="picked" type="radio" value="red" />
<label for="red-pill">Red pill</label>
Select Changed
Aurelia 1
<template>
<select value.bind="selectedColorId">
<option value="">Select A Color</option>
<option
repeat.for="color of colors"
value.bind="color.id"
disabled.bind="color.isDisabled"
>
${color.text}
</option>
</select>
</template>
Aurelia 2
<select value.bind="selectedColorId">
<option value="">Select A Color</option>
<option
repeat.for="color of colors"
value.bind="color.id"
disabled.bind="color.isDisabled"
>
${color.text}
</option>
</select>
Webapp features
Render app
Aurelia 1
Missing snippet Help us to improve Component Party 
Aurelia 2
<!doctype html>
<html>
<head>
<script type="module" src="./main.ts"></script>
</head>
<body>
<app></app>
</body>
</html>
Fetch data Changed
Aurelia 1
<template>
<p if.bind="isLoading">Fetching users...</p>
<p if.bind="error">An error ocurred while fetching users</p>
<ul if.bind="users">
<li repeat.for="user of users">
<img src.bind="user.picture.thumbnail" alt="user" />
<p>${ user.name.first } ${ user.name.last }</p>
</li>
</ul>
</template>
Aurelia 2
<template promise.bind="useFetchUsers.fetchData()">
<p pending>Fetching users...</p>
<p catch>An error ocurred while fetching users</p>
<ul then.from-view="users">
<li repeat.for="user of users">
<img src.bind="user.picture.thumbnail" alt="user" />
<p>${ user.name.first } ${ user.name.last }</p>
</li>
</ul>
</template>