EmberJSは何らかの理由でcamelCaseで記述されたモデル属性を設定しません。 JSONAPIAdapterを使用しています(RESTAdapterはオプションではありません)。 はここに私のモデルである:EmberJSがcamelCased属性を設定しない
import DS from 'ember-data';
export default DS.Model.extend({
shortName: DS.attr('string'),
fullName: DS.attr('string'),
inn: DS.attr('string'),
kpp: DS.attr('string'),
checkingAccount: DS.attr('string'),
correspodentAccount: DS.attr('string'),
bik: DS.attr('string'),
});
私のハンドルテンプレート:サーバーから
{{#each model as |company|}}
<tr class="companies-list__item">
<td class="companies-list__property">{{company.shortName}}</td>
<td class="companies-list__property">{{company.inn}}</td>
<td class="companies-list__property">{{company.kpp}}</td>
<td class="companies-list__property">{{company.checkingAccount}}</td>
<td class="companies-list__property">{{company.correspodentAccount}}</td>
<td class="companies-list__property">{{company.bik}}</td>
</tr>
{{/each}}
回答は次のようになります、それは旅館、KPP、BIKを移入ん
{
type: 'company',
id: 4,
attributes: {
shortName: 'Рога и копыта',
fullName: 'ООО Рога и копыта',
inn: '312312312',
kpp: '767675572',
checkingAccount: '3123145124',
correspodentAccount: '6547598',
bik: '76979356'
},
},
が、他の人は使用しません。どうしたの?
は、サーバーへのアクセス権を持っていますか? –