ko-lists
TypeScript icon, indicating that this package has built-in type declarations

0.4.4 • Public • Published

Knockout List Components

Work in progress, currently usable with TypeScript

Installation

npm install ko-lists --save

or add ko-lists.js to your browser via a script tag.

<script src="scripts/ko-lists.js"></script>
<!-- Or use the github CDN -->
<script src="https://rawgit.com/longshot-io/ko-lists/v0.4.4/ko-lists.js"></script>

or load it with RequireJS/Cajon.

require.config({
    // rest of your config ...
    paths: {
        'ko-lists': ['//rawgit.com/longshot-io/ko-lists/v0.4.1/ko-lists.js']
    }
});

Usage

NB: Knockout must be available either globally or through RequireJS.

// TypeScript
import * as KoLists from 'ko-lists';
 
class MyModel extends KoLists.Model {
    // ...
}
 
class MyList extends KoLists.List {
    constructor(opts: any) {
        super(opts);
    }
    
    ...
}
 
var opts = {
    url: '/my-end-point',
    createModel: (model?: any) => new MyModel(model);
}
 

Package Sidebar

Install

npm i ko-lists

Weekly Downloads

4

Version

0.4.4

License

MIT

Last publish

Collaborators

  • seikho