Chapter 3. Ember Templates

In this chapter, we will cover the following recipes:

  • Defining an application template
  • Working with conditionals in templates
  • Displaying a list of items
  • Binding with element attributes and classes
  • Working with HTML links inside templates
  • Handling HTML actions
  • Using template input helpers
  • Using development helpers

Introduction

Ember applications use a templating engine to display HTML and dynamic content to the user. In Ember, this is done via the Handlebars templating library. This library takes Handlebars expressions and renders them to the screen using data binding.

HTMLbars is a variant of Handlebars that Ember uses as well. It has better performance and handles building the DOM in a more efficient manner. Keep in mind that for this chapter, we'll be using HTMLbars and Handlebars interchangeably as they essentially do the same thing.

In this chapter, we'll be going over how to use templates in our applications.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset