The knockout docs say the click binding will pass the data-context to the click handler function goToFolder
.
In this case the data context is a string, the folder name because the click binding is inside a foreach binding.
This binding click: $root.goToFolder
is basically shorthand for this:
click: function() { $root.goToFolder($data); }