Adding click binding to existing view/viewmodel in Durandal/knockout
问题 I'm using a third party charting tool that generates a legend and in that legend I'm making the labels clickable. It uses a callback function to generate the label function legendLabelFormatter(label, series) { var linkHTML = '<a href="#" data-bind="click: drillDown(' + seriesIndex + '), clickBubble: false;">' + label + '</a>'; seriesIndex += 1; return linkHTML; } Obviously as the above labelFormatter function is activated after binding as a result of actions the user takes, the link binding