javascript - Ember data: findRecord is undefined. (also peekRecord or peekAll) -
i'm trying switch ember-data , cant seem find solution error:
typeerror: this.store.findrecord not function. (in 'this.store.findrecord('feed', feed_id)', 'this.store.findrecord' undefined)
this code inside controller action:
togglearchive(feed_id, param,intercom_event){ var self = this; this.set('isloading',true); return this.store.findrecord('feed', feed_id).then(function(feed) { //setting system_status of feed either 4 (archived) or 1 (normal) feed.set('system_status',param); //persist change store (and server) return feed.save(); }); },
on route call :
model: function(params){ return this.store.findrecord('feed',params.feed_id); },
and in package.json im using : "ember-data": "1.13.8",
if call old this.store.find()
method, record retrieved, not ideal method being deprecated , doesn't work expected.
any hints on might doing wrong?
thanks :)
you need package entry ember data in bower.json:
"ember-data": "1.13.8"
Comments
Post a Comment