10

App.User.find() is now this.store.find(), so how do I get there from the console?

2 Answers2

13

You have the possibility to lookup through the container,

App.__container__.lookup('store:main').find('user')

Obviously, this is only for debugging, and maybe for testing purpose. You must never use this in your production code, because it's a call to a global scope, which is a bad practice in general.

Or I think, if you install the ember-extension for chrome (https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi?hl=fr), it will show you the model used in the current route.

sly7_7
  • 11,961
  • 3
  • 40
  • 54
3

Also if you have a developer window open you could just add a debugger statement just before the call. Just make sure you remove then when your done.

debugger;
this.store.find();

It will pause execution of the javascript at that point and this will be the context you need to access the store object.

Rob
  • 1,071
  • 8
  • 10