0.2.0 • Published 8 years ago
ac-grid v0.2.0
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
- 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- 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>- 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 servernpm run build: build the projectnpm test: run tests
License
MIT