Skip to content

calvinwoo/knockout-bind-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');
    };
};

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published