Understanding the functionalities of Ember Data

Ember Data uses a single data store that can be accessed throughout an application. In this example, we'll create a simple application that retrieves a list of books and displays it to the user.

Getting ready

Before we begin, we'll need to mock data for our server. Ember CLI has a built-in mock server that can handle this situation by generating a basic Express server. However, for the purposes of this recipe, we'll go ahead and use the Ember CLI Mirage add-on. It has more features and is easier to use. You can find more information about Ember CLI Mirage at https://github.com/samselikoff/ember-cli-mirage.

  1. To begin, let's create a new application:
    $ ember new BookExample
    
  2. After the application has been ...

Get Ember.js Cookbook 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.