21.0.1 • Published 5 years ago

ag-grid-aurelia v21.0.1

Weekly downloads
472
License
MIT
Repository
github
Last release
5 years ago

ag-Grid Aurelia Component

This project contains the Aurelia Component for use with ag-Grid.

Usage

Please refer to www.ag-grid.com for full documentation on ag-Grid and Aurelia integration. Also take a look a the provided examples at https://github.com/ag-grid/ag-grid-aurelia-example.

Frameworks Supported

Framework specific Getting Started guides: Angular 1 | Angular 2 | Aurelia Javascript | React | TypeScript VueJS | Web Components

In your main entry.

aurelia.use
    .standardConfiguration()
    .plugin('ag-grid-aurelia');

In your view model

import {GridOptions} from 'ag-grid';
export class MyGridPage {

    public gridOptions:GridOptions;

    constructor() {
        this.gridOptions = <GridOptions>{};
        this.gridOptions.rowData = [{id: 1, name: 'Shane'}, {id: 2, name: 'Sean'}];
    }

    public onGridReady(){
        console.log('Grid is ready!!');
        console.log('1st col field = ' + this.gridOptions.columnDefs[0].field);
    }

    public onIdClicked(row){
        console.log('id clicked ' + row.id);
    }
}

In your view template. Here we are adding columns using markup. ColumnDefs can be added from your view model if you wish.

<template>
    <div style="width: 100%; height: 350px;">
      <ag-grid-aurelia grid-options.bind="gridOptions" class="ag-material"
                       row-height.bind="48"
                       grid-ready.call="onGridReady()">
        <ag-grid-column header-name="My Group Column">
          <ag-grid-column header-name="Id" field="id">
              <ag-cell-template>
                <button md-button class="btn accent"  click.delegate="params.context.onIdClicked(params.data)">${params.value}</button>
              </ag-cell-template>
          </ag-grid-column>
          <ag-grid-column header-name="Name" field="name" >
          </ag-grid-column>
        </ag-grid-column>

      </ag-grid-aurelia>
    </div>

</template>

Building

To build:

  • npm install
  • npm install gulp -g
  • npm install aurelia-framework
  • npm install ag-grid
  • (or: npm install aurelia-framework@1.0.x && npm install ag-grid@13.0.2)

  • npm run build

21.0.1

5 years ago

21.0.0

5 years ago

20.2.0

5 years ago

20.1.0

5 years ago

20.0.0

5 years ago

19.1.2

6 years ago

19.1.1

6 years ago

19.1.0

6 years ago

19.0.0

6 years ago

18.1.0

6 years ago

18.0.0

6 years ago

17.1.0

6 years ago

17.0.0

6 years ago

16.0.0

6 years ago

15.0.0

6 years ago

14.2.0

6 years ago

13.3.0

7 years ago

13.2.0

7 years ago

13.0.2

7 years ago

12.0.0

7 years ago

11.0.0

7 years ago

10.1.0

7 years ago

10.0.0

7 years ago

9.1.0

7 years ago

9.0.0

7 years ago

8.2.0

7 years ago

8.1.0

7 years ago

8.0.0

7 years ago

7.2.0

7 years ago

7.1.0

7 years ago

7.0.0

7 years ago

7.0.0-beta.0

7 years ago