How to get Ember Data's “store” from anywhere in the application so that I can do store.find()?

后端 未结 4 1952
我寻月下人不归
我寻月下人不归 2021-02-07 09:47

With the recent update, I know that in routers and controllers, I can easily just do this.store.find(\'model\'). However I have some functions that need to call

4条回答
  •  失恋的感觉
    2021-02-07 10:30

    You can try to do

    this.get('controller').get('store').find('model')
    

    That would wok in a View for example.

提交回复
热议问题