Monday, May 13, 2013

Binding a partial view with knockout

If there's a part of your view which you don't want to bind right away, you can defer it very easily. The basic solution is to include this code:


ko.bindingHandlers.stopBinding = {
    init: function ()
    {
        return { controlsDescendantBindings: true };
    }
};

<section>
        <!-- ko stopBinding: true -->        
        <div></div>
        <!-- /ko -->
    </section>








You can also check out this detailed solution.

No comments: