Package Exports
- jqb-ko-component
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jqb-ko-component) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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) {}
};