aurelia-gridster
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-BETA • Public • Published

aurelia-gridster

Ported from https://github.com/BTMorton/angular2-grid

Installing

npm install aurelia-gridster --save

Using

main.ts

import { PLATFORM } from 'aurelia-pal';
import { Aurelia } from 'aurelia-framework';
 
export async function configure(aurelia: Aurelia) {
  aurelia.use
    .standardConfiguration()
    .plugin(PLATFORM.moduleName('aurelia-gridster'))
 
  await aurelia.start();
  await aurelia.setRoot(PLATFORM.moduleName('app'));
}

dashboard.html

<template>
    <au-gridster grid-opts.bind="gridOpts">
        <au-gridster-item  item-opts.two-way="item" repeat.for="item of standardItems">

        </au-gridster-item>
    </au-gridster>
<template>    

dashboard.ts

 
export class Dashboard {
  standardItems:any[];
  gridOpts:any;
  constructor() {
    this.standardItems = [ 
        { sizex: 2, sizey: 1, row: 0, col: 0 , title:'Default'}
      ];
    this.gridOpts = {
      'auto_resize':true,
      'max_cols':6,
      'maintain_ratio':true
    }
  }
}

TODO

Opts manual
Demo site
Resize on left,top edges

Readme

Keywords

Package Sidebar

Install

npm i aurelia-gridster

Weekly Downloads

9

Version

0.0.1-BETA

License

MIT

Unpacked Size

428 kB

Total Files

44

Last publish

Collaborators

  • mdf22