通过最近的更新,我知道在路由器和控制器中,我可以轻松做到this.store.find('model')。但是,我有一些需要调用的功能find不在路由器和控制器中。那么如何store从 Ember 应用程序中的任何位置获取实例呢?  
我知道最坏的情况是我能做App.__container__.lookup('store:main')的,但我会尽量避免这种情况。
通过最近的更新,我知道在路由器和控制器中,我可以轻松做到this.store.find('model')。但是,我有一些需要调用的功能find不在路由器和控制器中。那么如何store从 Ember 应用程序中的任何位置获取实例呢?  
我知道最坏的情况是我能做App.__container__.lookup('store:main')的,但我会尽量避免这种情况。
TRANSITION文档说您可以这样做将商店注入到组件中:
App.inject('component', 'store', 'store:main');
您可能可以更改'component'为'view'或'model',但我不确定。
你可以做
App.Model.store.find('model')
如果您有要过滤的特定属性,您可以执行以下操作:
App.Model.store.find('model', {'attribute_name' : 'matching_to_this_value'})
你可以尝试做
this.get('controller').get('store').find('model')
例如,这将在 View 中工作。
使用 Ember 数据1.0.0-beta.X:
App.YourModelType.store.find("yourModelType", someId).then( 
  function(modelInstance) { 
  ...
  });