Another option to solve this issue is to create your own binding. That sounds hard, but it's really easy and KO was designed with custom binding in mind. I wish the base package had more of them, but they are trivial to create. The advantage to this solution is that your binding is simple and more legible. Here is an example, called hidden:
ko.bindingHandlers.hidden = (function() {
function setVisibility(element, valueAccessor) {
var hidden = ko.unwrap(valueAccessor());
$(element).css('visibility', hidden ? 'hidden' : 'visible');
}
return { init: setVisibility, update: setVisibility };
})();
And used in your HTML as:
data-bind="hidden: !repeat()"