0.0.0 • Published 10 years ago

jqb-ko-component v0.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

jqb-ko-component

Utility to register KnockoutJS components.

It works amazingly with PoliteJS/Workspace

var component = require('jqb-ko-component');
component.register(
    'component-name',
    require('./path/to/template.html'),
    require('./path/to/view-model')
);

so far the view model should be a Constructor function:

module.exports = function(params, info) {};

or a prototype object:

module.exports = {
    init: function(params, info) {}
};