Recently I\'ve separated out ViewModel to a separate JavaScript file.
var Report = (function($) { var initialData = []; var viewModel = { rep
Another solution is to use 'bind' construct:
data-bind="click: Report.preview.bind($data, 'url/to/report')"
where the first parameter to bind() will become the 'this' in the called function.