# How set data when i call render method?

**URL:** <https://discuss.emberjs.com/t/how-set-data-when-i-call-render-method/10820>\
**Category:** Uncategorized\
**Created:** [June 1, 2016, 2:26pm UTC](https://discuss.emberjs.com/t/how-set-data-when-i-call-render-method/10820 "2016-06-01T14:26:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobsboris27](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jobsboris27/32/12385_2.png) [@jobsboris27](https://discuss.emberjs.com/u/jobsboris27)\
**Post date:** [June 1, 2016, 2:26pm UTC](https://discuss.emberjs.com/t/how-set-data-when-i-call-render-method/10820/1 "2016-06-01T14:26:36Z")

</div>

this.render(modalTemplate, {  
into: ‘application’,  
outlet: ‘uiModalContent’,  
data: data  
});

And in template.hbs display data. How can do it?

---

<div class="post-metadata">

**Author:** ![alexspeller](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/alexspeller/32/14812_2.png) [@alexspeller](https://discuss.emberjs.com/u/alexspeller)\
**Post date:** [June 2, 2016, 11:34am UTC](https://discuss.emberjs.com/t/how-set-data-when-i-call-render-method/10820/2 "2016-06-02T11:34:02Z")

</div>

If you are using `this.render` inside the `renderTemplate` hook of a route, your route will have a model hook.

If you are using it somewhere else, this is an error. Use a component / service based approach, or something like ember-modal-dialog instead

---

<div class="post-metadata">

**Author:** ![jobsboris27](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jobsboris27/32/12385_2.png) [@jobsboris27](https://discuss.emberjs.com/u/jobsboris27)\
**Post date:** [June 2, 2016, 12:36pm UTC](https://discuss.emberjs.com/t/how-set-data-when-i-call-render-method/10820/3 "2016-06-02T12:36:46Z")

</div>

Sorry, but how display data from service to template?
