Debugging can be tedious, especially when cntl-R
is your only resort for trying new options. Instead, use batman.js’s $context
function to access the context of a specific node.
As I’m working with batman.js views, I use this technique for debugging in the browser: In Chrome, you can right-click, “Inspect element”, which makes the highlighted node available as $0
in the console. Then, pass $0
to $context
(which is a secret function created by batman.js) and it will return the batman.js view context for that node.
For example:
1 2 3 4 5 6 |
|
Now, isn’t that better!