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 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.