mardi 26 avril 2016

Ember Updating route to pull from store (Mirage)

I am trying to follow the ember tutorial to set up mock data in development. This is where I am reading from: http://ift.tt/1MLtopy

The tutorial is supposed to be showing me how to convert hard-coded data to mirage/config.js

I've gotten all the way to the bottom of the page, but it seems like it's missing a step. The .hbs, typed out on the previous page, has not been changed:


  <h2></h2>
  <p>Owner: </p>
  <p>Type: </p>
  <p>Location: </p>
  <p>Number of bedrooms: </p>


Which would be great except there's nothing in .

I see in the console that I have received the json:

Successful request: GET /rentals
server.js:255 Object {data: Array[3]}

And all my routes and stuff are pointing correctly, as I can see in Ember inspector:

  • Route Name: rentals
  • Route: rentals
  • Controller: rentals
  • Template: rentals
  • URL: /rentals

But how do I access that data? What am I missing?




Aucun commentaire:

Enregistrer un commentaire