Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Ember handlebar view for Foreignkey values

$
0
0

@imsreena7h wrote:

I have 4 models as below

exam model

name: attr('string'),
owner: belongsTo('user'),

question model

content: attr('string'),
exam: belongsTo('exam')

answer model

owner: belongsTo('user'),
question: belongsTo('question'),
answer: attr('string'),
remarks: attr('string'),
exam: belongsTo('exam')

user model

name : attr('string'),
email : attr('string'),
password : attr('string'),

when I load the models into a route. Now when I run the following template code

{{#each model.answers as |ans|}}
<p>{{ans.question}}</p>
<p>{{ans.question.content}}</p>
{{/each}}

it shows the output as follows

`<frontend@model:question::ember276:5>`

<frontend@model:question::ember281:6> <frontend@model:question::ember286:4>

why is is showing like this? why not the original content in the content field?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles