简体   繁体   中英

EmberJS TypeError: Object #<Object> has no method 'reject'

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.js http://builds.emberjs.com.s3.amazonaws.com/ember-data-latest.js

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

hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM