Inspect object in handlebars


#1

Hi there is a command to see the attribute of an object in handlebars for example

{{object.inspected}}


#2

I’m not sure what you are asking, but here goes:

  • if you use {{object.property}} that property value will be present in DOM after rendering same as {{property}} (if that property is present on current context)

  • if you’re looking something for debugging purposes you can use {{log object}} or {{log object.property}} in your case. This will write object/property value to browser console.


#3

You can use {{ debugger }}, Ember will set a breakpoint and you will be able to inspect your handlebars objects via get('object') in the console.


#4

Thanks a lot now I try this command