Skip to content

ronik-design/knockout-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

knockout-init

Module for initializing knockout observables.

Usage

<div data-bind="init: { key: foo, value: 'bar' }"></div>
var foo = ko.observable(null);
foo.subscribe(function (val) {
  // val === "bar" --> true
});

Installation

This is how I use it with a Webpack bundled project. Your setup may be different.

$ npm install knockout-init --save-dev
import ko from "knockout";
import init from "knockout-init";

ko.bindingHandlers.init = init(ko);

About

Module for initializing knockout observables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published