本文介绍了EmberJS TypeError:Object#< Object>没有方法'拒绝'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
TypeError:Object#没有方法'reject'
我已经设置了这个应用程序与ember,我得到这个奇怪的消息: strong>这是我的EmberJS应用配置:
App = Ember .Application.create();
App.Store = DS.Store.extend({
revision:12,
adapter:DS.RESTAdapter.extend({
url:'http:/ / localhost:8080',
namespace:'6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b'
})
});
App.Router.map(function(){
this.resource('collections');
});
App.IndexRoute = Ember.Route.extend({
redirect:function(){
this.transitionTo('collections');
}
});
App.CollectionsRoute = Ember.Route.extend({
model:function(){
return App.Collection.find();
}
});
App.Collection = DS.Model.extend({
name:DS.attr('string'),
createdAt:DS.attr('date')
});
任何想法? :(
解决方案
问题的接缝是你使用错误的ember / ember数据文件组合...这应该工作:
你可以在这里找到最新的版本:
希望它有助于
i've setup this app with ember and i'm getting this weird message:
TypeError: Object # has no method 'reject'
here's my EmberJS app config:
App = Ember.Application.create();
App.Store = DS.Store.extend({
revision: 12,
adapter: DS.RESTAdapter.extend({
url: 'http://localhost:8080',
namespace: '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b'
})
});
App.Router.map(function() {
this.resource('collections');
});
App.IndexRoute = Ember.Route.extend({
redirect: function(){
this.transitionTo('collections');
}
});
App.CollectionsRoute = Ember.Route.extend({
model: function(){
return App.Collection.find();
}
});
App.Collection = DS.Model.extend({
name: DS.attr('string'),
createdAt: DS.attr('date')
});
Any ideas? :(
解决方案
The problem seams to be that you are using the wrong ember/ember-data files combinations... this should work:
http://builds.emberjs.com.s3.amazonaws.com/ember-latest.jshttp://builds.emberjs.com.s3.amazonaws.com/ember-data-latest.js
you can get here the latest builds: http://builds.emberjs.com
hope it helps
这篇关于EmberJS TypeError:Object#< Object>没有方法'拒绝'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!