© Matthew Duffield 2018
Matthew DuffieldPractical App Development with Aurelia https://doi.org/10.1007/978-1-4842-3402-0_9

9. Templates

Matthew Duffield1 
(1)
West Linn, Oregon, USA
 

In this short chapter we are going to cover ES2015 template strings and their role in Aurelia. We will look specifically at string interpolation and requiring dependencies. Upon completing this chapter, you should have a solid understanding around templates.

Templates

In HTML, we have the <template> element. We use this element to define any markup that we want to be rendered by the Aurelia templating engine. Aurelia follows the standards around using templates and it makes it really easy to use. Let’s consider a simple example of a template:

<template>
  <h1>Hello World</h1> ...

Get Practical App Development with Aurelia: Leverage the Power of Aurelia to Build Personal and Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.