2
不工作我试图烬带帆联系,但似乎错误在休息适配器休息适配器烬
import DS from 'ember-data';
import Ember from 'ember';
import appConf from '../models/app-conf'
export default DS.RESTAdapter.extend({
\t // authorizer: 'authorizer:oauth2',
\t namespace: 'api/v1',
\t host: localhost:1337,
\t // session: Ember.inject.service('session'),
\t // headers: Ember.computed('session.isAuthenticated', function() {
\t // \t return {
\t // \t \t 'authenticated': this.get('session.isAuthenticated')
\t // \t };
\t // }),
\t shouldReloadAll: function() { return true; },
\t shouldBackgroundReloadRecord: function() { return false; },
\t modelType: null,
pathForType: function (type) {
if (Ember.isNone(this.get("modelType")))
throw this + ".modelType is not set!!!";
\t \t return this.get("modelType");
\t }
});
什么不妥的部份代码, 预先感谢您。 。
只是检查你的主机 –
主机必须包含HTTP:// –
检查主持人,它必须与http:// –