How to inspect ember.js objects in the console?

by mallory_cormier , in category: Javascript , 4 months ago

How to inspect ember.js objects in the console?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by brandy , 4 months ago

@mallory_cormier 

To inspect Ember.js objects in the console, you can use the Ember.inspect() method.


Here's how you can do it:

  1. Open your web browser's developer tools (usually by right-clicking on the page and selecting "Inspect" or pressing F12).
  2. Navigate to the Console tab in the developer tools.
  3. Access the Ember.js object you want to inspect. For example, you can access a controller by typing App.__container__.lookup('controller:your_controller_name').
  4. Once you have the object, you can inspect it by calling Ember.inspect() on it. For example, you can type Ember.inspect(yourObject) in the console.


This will display the object in a more readable format in the console, allowing you to see its properties and values more clearly.