1
votes

My model (medid) is successfully loaded on my template (medid.hbs) but when I try to put a value from the record in as text it doesn't render anything.

In other templates everything I rendered from the model was in a table iterated on with an {{each}} helper. Here I used {{model.id}} to populate the table rows.

I assumed that I could just use something like 'Hello my name is {{model.id}} but that doesn't work. I'm probably missing something obvious

How do I access my model data for printing outside of a handlebars helper?

1
try mode.firstObject.id - Ember Freak
Superb, that worked great. Please submit as an answer so I can mark it correct. If you don't mind, could you also explain a little about why it works so I can learn for the future? - Sorvah

1 Answers

1
votes

To retrieve the first item from the array you can use firstObject. so in your case you can access it like {{model.firstObject.id}}