0

I would like to add the custom event in the empty function from empty results.

Here is an example code.

 ,templates: {empty: 'No results' + '<a data-bind="click: event">Go</a>', suggestion:... }

When I click the GO event, it doesn't work.

Let me know if you have any suggestions. Thank you.

siuri
  • 191
  • 2
  • 13
  • it doesnt work because when you run "ko.applyBindings(model)" the data-bind is not in the html dom yet. I will close as duplicate here you find answer: https://stackoverflow.com/questions/27137834/knockout-components-not-binding-on-new-content – john Smith Oct 12 '20 at 17:45
  • Does this answer your question? [Knockout components (not) binding on new content](https://stackoverflow.com/questions/27137834/knockout-components-not-binding-on-new-content) – john Smith Oct 12 '20 at 17:46

0 Answers0