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

Problem with the belongsTo relationship for a controller

$
0
0

I’m having a problem using the belongsTo relationship in my call model file. I want to have the file element in the call model point to a file and be able to access the elements present in the file model. The file element in the call model was originally only the object id for that particular file. screenshot-call-model-06:14

The call model

screenshot-file-model-06:14

The file model

The issue I’m having is that I don’t know how to access the content of the file model in the call controller. I understand that call.file on line 9 in the controller is returning a promise, but I don’t know how to deal with this since I’m having to loop through individual calls. If I use something like “call.file.filename” on line 9, it returns as undefined.

The call controller file

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4870

Trending Articles