1.1.0 • Published 8 years ago

knockout-bind-html v1.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

knockout-bind-html

A custom binding for KnockoutJS that will dynamically present the specified HTML, like the standard binding, but will also process any new bindings that are included.

Installation

bower install knockout-bind-html

Include via a <script> tag or an AMD style loader.

Usage

<div data-bind="bindHtml: clickable"><div>
var viewModel = {
    this.clickable = ko.observable('Click Here: <a href="#" data-bind="click: action">Execute!</a>');
    this.action = function() {
        console.log('Action executed');
    };
};