O'Reilly logo

Ember.js Cookbook by Erik Hanchett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining an application template

To work with templates, we need to understand the basics on how properties bind with controllers and components. Here are a few recipes that go over how to accomplish this.

Getting ready

Before we get started, we'll need to generate a template.

  1. We'll first create a new application using Ember CLI:
    $ ember new HelloWorldApp
    $ cd HelloWorldApp
    

    This command will generate a new application that we can use for this recipe.

  2. Next, create a new route that will add a new template:
    $ ember g route helloworld
    

    This command will generate the template and routes file as well as unit tests. The template file is called helloworld.hbs and will be generated in the app/templates folder. The route file is called helloworld.js and is located ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required