myModule.search location, item, (err, data) ->
if err?
res.end 'Error!'
else
res.write 'got here'
partial 'partials/table', {items: data, layout: false}
res.end()
return
I get the following error on my server:
partial('partials/table', {
^
ReferenceError: partial is not defined
Any idea?
While the examples in the guide demonstrate it as a global function, I think it’s only actually available like this within a view:
You can find a number of examples of this under
/examples/partialsin the repository.Within your script, however, it’s a method of the response object: