Socket
Socket
Sign inDemoInstall

checklist-model

Package Overview
Dependencies
0
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.6.0

LICENSE.txt

2

bower.json
{
"name": "checklist-model",
"version": "0.2.4",
"version": "0.6.0",
"description": "AngularJS directive for list of checkboxes",

@@ -5,0 +5,0 @@ "author": "https://github.com/vitalets",

{
"name": "checklist-model",
"description": "AngularJS directive for list of checkboxes",
"version": "0.5.0",
"license": "MIT",
"version": "0.6.0",
"homepage": "http://vitalets.github.io/checklist-model",

@@ -6,0 +7,0 @@ "author": {

@@ -12,16 +12,22 @@ # checklist-model

1. set `checklist-model` instead of `ng-model`
2. set `checklist-value` - what should be picked as array item
| Attribute | Mandatory | Description |
| :----------------: | :-------: | --------------------------------------------- |
| `checklist-model` | Yes | Use instead of `ng-model` |
| `checklist-value` | No | What should be picked as array item |
| `value` | No | What should be picked as item, but unlike `checklist-value`, this does not evaluate as an angular expression, but rather a static value |
| `ng-model` | No | Every checkbok will span a new scope and define a variable named `checked` to hold its state. You can modify this name by using this attribute. |
| `checklist-comparator` | No | A custom comparator. If it starts with dot(`.`) then it will be an expression applied to the array item. Otherwise it should evaluate to a function as an angular expression. The function return true if the first two arguments are equal and false otherwise. |
| `checklist-change` | No | An angular expression evaluated each time the `checklist-model` has changed. |
Please, try out live demo: http://vitalets.github.io/checklist-model
* If you modify directly the value of the `checklist-model`, it is possible that the UI won't be updated. This is because this directive looks for the model in the parent, not in the current scope. Instead of doing `checklistModelList = []` it is better to do `checklistModelList.splice(0, checklistModelList.length)` or wrap it in another object.
* If you're using `track by` you must specify the same thing for `checklist-value` too. See [#46](https://github.com/vitalets/checklist-model/issues/46).
Jsfiddle: http://jsfiddle.net/Ebv3p/2/
Plunker (more advanced): http://plnkr.co/edit/pZLF0KesMDnIap0eCfSG?p=preview
Please, try out
* live demo: http://vitalets.github.io/checklist-model
* Jsfiddle: http://jsfiddle.net/Ebv3p/2/
* Plunkr example (more advanced): http://plnkr.co/edit/pZLF0KesMDnIap0eCfSG?p=preview
* Plunkr example for [tree list](http://plnkr.co/edit/QPLk98pCljp8dFtptSYz?p=preview)
## Installation
1. [Download latest release](https://github.com/vitalets/checklist-model/releases) or use bower:
````
bower install checklist-model
````
1. Download [latest release](https://github.com/vitalets/checklist-model/releases) or use bower `bower install checklist-model` or install from npm `npm install checklist-model`
2. Add to app dependencies:

@@ -32,2 +38,8 @@ ````js

## How to get support
* Ask a question on StackOverflow and tag it with [checklist-model](http://stackoverflow.com/questions/tagged/checklist-model).
* [Fill in](https://github.com/vitalets/checklist-model/issues/new) an issue.
Please keep in mind to also create a Plunkr or JSFiddle example. This will greatly help us in assisting you and you can use one of the existing examples and fork it.
## Development

@@ -34,0 +46,0 @@ We're using grunt as the build system. `grunt jade` generates the demo file and `grunt server` starts the demo server that can be access at `http://localhost:8000`. Tests can be ran by accessing `http://localhost:8000/test`.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc