Work with Records

While many of the methods in the DS.Store class deal with loading and caching lists of records, your app will also often work with records directly. Sometimes you’ll use the store, and sometimes you’ll call methods on the record itself. Let’s start with one that we call from the store, and learn how we can add data with the Ember app.

Creating Records

For users to find your app useful, they need to be able to add data to persistent storage. We’ve seen this already in the EmberNote application, where users add their own notebooks and notes. Let’s take a look at that code now. In the notebooks route, we added a feature that let users add a notebook:

 addNotebook​:​ ​function​() {
 let ...

Get Deliver Audacious Web Apps with Ember 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.