How to find model with Ember Data?

后端 未结 2 1938
星月不相逢
星月不相逢 2021-01-27 16:24

What\'s the equivalent of

App.Person.find({age: 30})

in the new Ember Data?

I.e. how do I get an record array based on an attribute?

2条回答
  •  故里飘歌
    2021-01-27 16:59

    The equivalent method in ember data 1.0.0 beta2 is now:

    this.store.find('person', {age: 30})
    

    More info on all the changes can be found here.

    Hope it helps.

提交回复
热议问题