checklist-model
Advanced tools
Comparing version 0.10.0 to 0.11.0
{ | ||
"name": "checklist-model", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "AngularJS directive for list of checkboxes", | ||
@@ -5,0 +5,0 @@ "author": "https://github.com/vitalets", |
@@ -66,3 +66,9 @@ /** | ||
var comparator = angular.equals; | ||
var comparator = function (a, b) { | ||
if(!isNaN(a) && !isNaN(b)) { | ||
return String(a) === String(b); | ||
} else { | ||
return angular.equals(a,b); | ||
} | ||
}; | ||
@@ -69,0 +75,0 @@ if (attrs.hasOwnProperty('checklistComparator')){ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"homepage": "http://vitalets.github.io/checklist-model", | ||
@@ -8,0 +8,0 @@ "author": { |
@@ -9,5 +9,5 @@ ![Bower](https://img.shields.io/bower/v/checklist-model.svg) [![NPM](https://img.shields.io/npm/v/checklist-model.svg)](https://www.npmjs.com/package/checklist-model) ![License](https://img.shields.io/npm/l/checklist-model.svg) | ||
## Why this is needed? | ||
In Angular one checkbox `<input type="checkbox" ng-model="...">` is linked | ||
In Angular one checkbox `<input type="checkbox" ng-model="...">` is linked | ||
with one model. | ||
But in practice we usually want one model to store array of checked values | ||
But in practice we usually want one model to store array of checked values | ||
from several checkboxes. | ||
@@ -18,3 +18,3 @@ **Checklist-model** solves that task without additional code in controller. | ||
You should play with attributes of `<input>` tag: | ||
| Attribute | Mandatory | Description | | ||
@@ -46,3 +46,3 @@ | :-----------------------: | :-------: | --------------------------------------------- | | ||
3. Install from npm `npm install checklist-model` | ||
2. If your JavaScript file is not generated from dependencies, then you must include it in your HTML `<script src='checklist-model.js'></script>` | ||
2. If your JavaScript file is not generated from dependencies, then you must include it in your HTML `<script src='checklist-model.js'></script>` | ||
3. Add to app dependencies: | ||
@@ -74,3 +74,3 @@ ````js | ||
### How to make a new release | ||
1. Change the version number in `bower.json` and `package.json` (if not already changed - check the version number against the latest release in Github) | ||
1. Change the version number in `package.json`, `bower.json` and `checklist-model.nuspec` (if not already changed - check the version number against the latest release in Github) | ||
2. Create a new [release](https://github.com/vitalets/checklist-model/releases) in github with the same name for tag and title as the version number (e.g. `1.0.0`). Do not forget to include the changelog in the release description. | ||
@@ -80,2 +80,2 @@ 3. Run `npm publish` to publish the new version to npm | ||
## License | ||
MIT | ||
MIT |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
97797
57
1107