# Why template is not rendered?

**URL:** <https://discuss.emberjs.com/t/why-template-is-not-rendered/7115>\
**Category:** Ember Data\
**Created:** [January 21, 2015, 8:19am UTC](https://discuss.emberjs.com/t/why-template-is-not-rendered/7115 "2015-01-21T08:19:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![larryisthere](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/larryisthere/32/9844_2.png) [@larryisthere](https://discuss.emberjs.com/u/larryisthere)\
**Post date:** [January 21, 2015, 8:19am UTC](https://discuss.emberjs.com/t/why-template-is-not-rendered/7115/1 "2015-01-21T08:19:09Z")

</div>

```
// routes/me/contact.js
 
import Ember from 'ember';
export default Ember.Route.extend({
  model: function() {
    return this.store.find('contact');
  }
});
 
// templates/me/contact.hbs
 
{{#each contact in contacts}}
  <div class="item clearfix">
    <div class="row hd clearfix" style="line-height: 56px;">
      <div class="col-10"><img class="avatar" {{bind-attr src=contact.avatar}}> <span class="nickname">{{contact.nickname}}</span></div>
      <div class="col-2 txt-center" {{ action 'acceptContactRequest' contact }}>
        <i class="success fa fa-check"></i>
      </div>
    </div>
  </div>
{{/each}}
 
// server/mocks/contacts.js
module.exports = function(app) {
  var express = require('express');
  var contactsRouter = express.Router();
  var routes = [];
  contactsRouter.get('/*', function(req, res) {
    var ret = {};
    ret.contacts = [{
      id: 1,
      user: 1,
      email: 'gmr.nicole@gmail.com',
      nickname: 'Nicole',
      avatar: 'http://secure.gravatar.com/avatar/f42113ba1ee96caf35500bc525d994f8',
      currency: 'CNY',
      amount: '-1.27',
      isConnected: false
    },
    {
      id: 2,
      user: 1,
      email: 'gmr.nicole@gmail.com',
      nickname: 'Nicole',
      avatar: 'http://secure.gravatar.com/avatar/f42113ba1ee96caf35500bc525d994f8',
      currency: 'CNY',
      amount: '-1.27',
      isConnected: true
    },
    {
      id: 3,
      user: 1,
      email: 'gmr.nicole@gmail.com',
      nickname: 'Nicole',
      avatar: 'http://secure.gravatar.com/avatar/f42113ba1ee96caf35500bc525d994f8',
      currency: 'CNY',
      amount: '-1.27',
      isConnected: true
    },
    {
      id: 4,
      user: 1,
      email: 'gmr.nicole@gmail.com',
      nickname: 'Nicole',
      avatar: 'http://secure.gravatar.com/avatar/f42113ba1ee96caf35500bc525d994f8',
      currency: 'CNY',
      amount: '-1.27',
      isConnected: true
    }];
    res.send(ret);
  });
  routes.push(contactsRouter);
  app.use('/api/contacts', contactsRouter);
};

```

---

<div class="post-metadata">

**Author:** ![larryisthere](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/larryisthere/32/9844_2.png) [@larryisthere](https://discuss.emberjs.com/u/larryisthere)\
**Post date:** [January 21, 2015, 3:03pm UTC](https://discuss.emberjs.com/t/why-template-is-not-rendered/7115/2 "2015-01-21T15:03:40Z")

</div>

It’s been solved.

In template, I should use **model** instead of **contacts** to get the model.
