diff --git a/TUTORIALS.md b/TUTORIALS.md index f87e556..b698118 100644 --- a/TUTORIALS.md +++ b/TUTORIALS.md @@ -282,7 +282,7 @@ We will fetch all books and render them in our template. In routes/books.js: = export default class BooksRoute extends Route { + @service store; + -+ model(){ ++ model() { + return this.store.findAll('book'); + } = } @@ -313,12 +313,12 @@ In the app/templates/book.hbs template, we’ll add our create fields and button +
Book title
+
+ ++ placeholder="Thinking Fast and Slow" /> +
+
ISBN
+
+ ++ placeholder="978-0374533557" /> +
+ + @@ -346,9 +346,9 @@ We’ll add this action in the controller and make it create the new book. In a + // create the new book + const book = this.store.createRecord('book', { + title: this.newTitle, -+ isbn: this.newIsbn ++ isbn: this.newIsbn, + }); -+ book.save() ++ book.save(); + // clear the input fields + this.newTitle = ''; + this.newIsbn = ''; @@ -365,7 +365,7 @@ In app/templates/book.hbs we alter: ```diff =
  • = {{book.title}}{{book.isbn}} -+ ++ =
  • ```