ac-grid

0.2.0 • Public • Published

ac-grid

ac-grid is an AngularJS directive for displaying a grid of checkboxes corresponding to the keys of a JSON object. It returns the user selections as an array of selected values.

To use, add an ac-grid element.

<ac-grid ng-model="$ctrl.selections" options="$ctrl.options" per-row="3"></ac-grid>

Installation

  1. Install via yarn or npm (recommended) or bower (deprecated)
yarn add ac-grid --save

-- or --

npm install --save ac-grid

-- or --

bower install ac-grid
  1. Include the files in your code
<link rel="stylesheet" type="text/css" href="node_modules/ac-grid/ac-grid.css">
...
<script src="node_modules/ac-grid/ac-grid.js"></script>
  1. Require ac-grid in your angular module.
angular.module('myapp', ['ac-grid']);

Usage

<ac-grid ng-model="$ctrl.selections" options="[{ label: 'A', value: 'a' }, { label: 'B', value: 'b' }]" per-row="3"></ac-grid>

Development

Available Commands

  • npm start: build the project and run a dev server
  • npm run build: build the project
  • npm test: run tests

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i ac-grid

Weekly Downloads

51

Version

0.2.0

License

MIT

Unpacked Size

21.6 kB

Total Files

19

Last publish

Collaborators

  • alexander-clark