I am trying to use template.find to make my life easier.
But in the javascript console I get: undefined is not a function
Here\'s what I have. I
The Event handler function receives two arguments: event
, an object with information about the event, and template
, a template instance for the template where the handler is defined.
The second parameter is optional, but it needs to be received in handler when you want to use template instance functions like find()
, findAll()
, firstNode()
and lastNode()
.
So, to use the template.find()
in your event handler, you need to pass both the arguments as:
'click input.new_device': function (event, template) {
// your event handling code
}