EmberJS 类型错误:对象#<对象>没有方法“拒绝" [英] EmberJS TypeError: Object #&lt;Object&gt; has no method &#39;reject&#39;

查看:23
本文介绍了EmberJS 类型错误:对象#<对象>没有方法“拒绝"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用 ember 设置了这个应用程序,但我收到了这条奇怪的消息:

i've setup this app with ember and i'm getting this weird message:

TypeError: Object # 没有方法reject"

这是我的 EmberJS 应用配置:

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')
});

有什么想法吗?:(

推荐答案

问题接缝是您使用了错误的 ember/ember-data 文件组合...这应该有效:

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

您可以在此处获取最新版本:http://builds.emberjs.com

you can get here the latest builds: http://builds.emberjs.com

希望能帮到你

这篇关于EmberJS 类型错误:对象#<对象>没有方法“拒绝"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆