2013-05-03 23 views
5

我已经安装此应用余烬和我得到这个奇怪的消息:EmberJS类型错误:对象#<Object>有没有方法“拒绝”

类型错误:对象#有没有方法“拒绝”

这里是我的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') 
}); 

任何想法? :(

回答

7

问题接缝是您使用了错误的余烬/烬数据文件的组合......这应该工作:

http://builds.emberjs.com.s3.amazonaws.com/ember-latest.js http://builds.emberjs.com.s3.amazonaws.com/ember-data-latest.js

,你可以在这里得到最新的构建: http://builds.emberjs.com

希望它有助于

+0

谢谢:)但其实这是我用的是:( – 2013-05-04 00:16:19

+0

奇怪......这里是一个小提琴组合http://jsfiddle.net/intuitivepixel/AywvW/18 /这个组合完美运作。你能设置一个jsfiddle来显示你的index.html文件和你正在加载什么吗? – intuitivepixel 2013-05-04 00:30:18

+0

NOP :(奇怪的是,与不要求余烬数据基础的东西,它完美的作品,就像他们的网站上知道了指导:■ – 2013-05-04 00:35:42

相关问题