无法将商店的响应映射到模型 - EmberJS

Unable to map store's response to model - EmberJS

我正在尝试安装 Mirage 并试图伪造服务器的 ember 应用程序。我正在使用 RestAdapter,模型没有从响应中获取数据。

adapters/application.js

import DS from 'ember-data';

export default DS.RESTAdapter.extend({
});

contacts.js(型号)

import DS from 'ember-data';
import ContactModel from 'c360-app/models/contactsmodel';
export default ContactModel.extend({
    contactname: DS.attr(''),
    groupid: DS.attr(''),
    email: DS.attr(''),
    contactnumber: DS.attr('')
});

all.js(路线)

import ContactRoute from 'c360-app/routes/contactsroute';
export default ContactRoute.extend({
    model: function() {
        return this.store.findAll('contacts');
    }
});

fixtures/contacts.js

export default [  
    {
        contactname: 'Anusha Swaminathan',
        groupid: '12345',
        email: 'xyz@gmail.com',
        contactnumber: '+91 12345',
        isFavourite: true,
        isIncomplete: false,
        isActive: true,
        hasAccess: true
    }, {
        contactname: 'Sriram Swaminathan',
        groupid: '12345',
        email: 'xyz@gmail.com',
        contactnumber: '+91 12345',
        isFavourite: true,
        isIncomplete: false,
        isActive: true,
        hasAccess: true
    }, {
        contactname: 'Bhuvaneswari Swaminathan',
        groupid: '12345',
        email: 'xyz@gmail.com',
        contactnumber: '+91 12345',
        isFavourite: false,
        isIncomplete: false,
        isActive: true,
        hasAccess: true
    }
];

scenarios/default.js

export default function( server ) {
   server.loadFixtures();
}

Config.js(海市蜃楼)

export default function() {
  this.get('/contacts', function(db){
    return {contacts: db.contacts};
  });
}

接触-listing.hbs

    <table class = "contacts-table-header">
        <tr>
            <th>Contact Name</th>
            <th>Group ID </th>
            <th>Email Address</th>
            <th>Contact Number</th> 
        </tr>
{{#each model as |contact|}}
        <tr>
            <td>{{contact.contactname}}</td>
            <td>{{contact.groupid}}</td>
            <td>{{contact.email}}</td>
            <td>{{contact.contactnumber}}</td>
        </tr>

{{/each}}
</table>

我不知道我哪里出错了。

请指导。提前致谢!!

In all.js (route) 你可以试试 return this.store.findAll('contact');和模型文件名而不是 contacts.js 说 contact.js