0
votes

I have template wich displays a model. In this template, I can see the model properties, even the child/parents ones.

I want to create a component to display the parent, but in the component I only got a 'promise'.

template:

...
{{expedient-header expedient=model.expedient}}
....

I pass the model.expedient (expedient has many documents, and document belongsTo expedient, in this case, model = document.

In the same template where I call the component, the model.expedient is a fetched record, but when I pass it to the component, it's only a Promise.

If I pass the model, I get the model, but I want to make this component more independent, and just pass the model.expedient.

Is this possible/supported?

As I'm just a 'newbie' with ember, I'm just playing, I could maybe refactor how I'm doing things but I would like to know if this is possible ...

:-)

thanks!

1

1 Answers

0
votes

On init component you can work with promise, and after that render data. Because component is it "controller" for view.