checklist-model
Advanced tools
Comparing version 0.11.0 to 1.0.0
{ | ||
"name": "checklist-model", | ||
"version": "0.11.0", | ||
"version": "1.0.0", | ||
"description": "AngularJS directive for list of checkboxes", | ||
@@ -5,0 +5,0 @@ "author": "https://github.com/vitalets", |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ var app = angular.module("app", ["checklist-model"]); |
@@ -0,0 +0,0 @@ app.controller('Ctrl9', function($scope) { |
@@ -0,0 +0,0 @@ describe('array-dynamic', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl2', function($scope) { |
@@ -0,0 +0,0 @@ describe('array-id', function() { |
@@ -0,0 +0,0 @@ app.controller('NumbersCtrl', function($scope) { |
@@ -0,0 +0,0 @@ describe('array-numbers', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl3a', function($scope) { |
@@ -0,0 +0,0 @@ describe('array-object-with-ngmodel', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl3', function($scope) { |
@@ -0,0 +0,0 @@ describe('array-object', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl1', function($scope) { |
@@ -0,0 +0,0 @@ describe('array-simple', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl6a', function($scope) { |
@@ -0,0 +0,0 @@ describe('comparator-expression', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl5', function($scope) { |
@@ -0,0 +0,0 @@ describe('event', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl6', function($scope) { |
@@ -0,0 +0,0 @@ describe('filter', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl8', function($scope) { |
@@ -0,0 +0,0 @@ describe('function-as-model', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl4a', function($scope) { |
@@ -0,0 +0,0 @@ describe('object static list', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl4', function($scope) { |
@@ -0,0 +0,0 @@ describe('object', function() { |
@@ -0,0 +0,0 @@ app.controller('Ctrl7', function($scope) { |
@@ -0,0 +0,0 @@ describe('single-object', function() { |
@@ -0,0 +0,0 @@ module.exports = function(grunt) { |
@@ -0,0 +0,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.11.0", | ||
"version": "1.0.0", | ||
"homepage": "http://vitalets.github.io/checklist-model", | ||
@@ -13,6 +13,6 @@ "author": { | ||
"contributors": [ | ||
{ | ||
"name": "Adrian Ber", | ||
"email": "beradrian@yahoo.com" | ||
} | ||
{ | ||
"name": "Adrian Ber", | ||
"email": "beradrian@yahoo.com" | ||
} | ||
], | ||
@@ -27,24 +27,26 @@ "repository": { | ||
}, | ||
"dependencies": { | ||
"peerDependencies": { | ||
"angular": ">=1.0.8" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-cli": "~0.1.9", | ||
"grunt-contrib-clean": "~0.4.1", | ||
"grunt-contrib-concat": "~0.3.0", | ||
"grunt-contrib-compress": "~0.5.0", | ||
"grunt-contrib-copy": "~0.4.1", | ||
"grunt-contrib-jshint": "~0.5.3", | ||
"grunt-contrib-watch": "~0.4.3", | ||
"grunt-contrib-uglify": "~0.2.0", | ||
"grunt-replace": "~0.4.4", | ||
"grunt-contrib-connect": "~0.4.0", | ||
"grunt-contrib-jade": "~0.8.0", | ||
"grunt-contrib-cssmin": "~0.6.1", | ||
"marked": "~0.2.9", | ||
"grunt-jsdoc": "~0.4.1", | ||
"grunt-shell": "~0.5.0", | ||
"grunt-bump": "0.0.13" | ||
} | ||
"grunt": "^1.0.2", | ||
"grunt-bump": "^0.8.0", | ||
"grunt-cli": "^1.2.0", | ||
"grunt-contrib-clean": "^1.1.0", | ||
"grunt-contrib-compress": "^1.4.3", | ||
"grunt-contrib-concat": "^1.0.1", | ||
"grunt-contrib-connect": "^1.0.2", | ||
"grunt-contrib-copy": "^1.0.0", | ||
"grunt-contrib-cssmin": "^2.2.1", | ||
"grunt-contrib-jade": "^1.0.0", | ||
"grunt-contrib-jshint": "^1.1.0", | ||
"grunt-contrib-uglify": "^3.3.0", | ||
"grunt-contrib-watch": "^1.0.0", | ||
"grunt-jsdoc": "^2.2.1", | ||
"grunt-replace": "^1.0.1", | ||
"grunt-shell": "^2.1.0", | ||
"jstransformer-markdown": "^1.2.1", | ||
"marked": "^0.3.19" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -15,2 +15,21 @@ ![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) | ||
## Live demo | ||
http://vitalets.github.io/checklist-model | ||
## Installation | ||
> Note: since version `1.0.0` you *must* install the `angular` library yourself as it is now a [`peerDependency`](https://nodejs.org/en/blog/npm/peer-dependencies/) | ||
1. Download package: | ||
* From npm `npm install checklist-model` | ||
* From bower `bower install checklist-model` | ||
* From [latest release](https://github.com/vitalets/checklist-model/releases) | ||
2. Include script to the HTML: | ||
```html | ||
<script src='checklist-model.js'></script> | ||
``` | ||
3. Add to app dependencies: | ||
```js | ||
var app = angular.module("app", ["checklist-model"]); | ||
``` | ||
## Usage | ||
@@ -29,8 +48,7 @@ You should play with attributes of `<input>` tag: | ||
* 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 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 = []` you should do `checklistModelList.splice(0, checklistModelList.length)` or wrap it in another object. Consequently, instead of doing `checklistModelList = angular.copy(allValues)` you should do `checklistModelList.push.apply(checklistModelList, allValues)`. The idea is to use the same array and not replace it with a new one. | ||
* 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). | ||
* If you're also using `ngModel`, please keep in mind that the state of the checkbok is initialized with the value from `checklistModel`, not with the one from `ngModel`. Afterwards the two will be kept in sync, but initially, these two can be conflicting, so only `checklistModel` is used. See the entire discussion at [#104](https://github.com/vitalets/checklist-model/issues/104). | ||
Please, try out | ||
* Live demo: http://vitalets.github.io/checklist-model | ||
## Examples | ||
* JsFiddle basic example (use this to report any issue): http://jsfiddle.net/beradrian/fjoLy5sq/ | ||
@@ -41,13 +59,2 @@ * JSFiddle required example: http://jsfiddle.net/beradrian/7wt9q1ev/ | ||
## Installation | ||
1. Include the directive in your code | ||
1. Download [latest release](https://github.com/vitalets/checklist-model/releases) *or* | ||
2. Use bower `bower install checklist-model` *or* | ||
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>` | ||
3. Add to app dependencies: | ||
````js | ||
var app = angular.module("app", ["checklist-model"]); | ||
```` | ||
## How to get support | ||
@@ -60,6 +67,8 @@ * Ask a question on StackOverflow and tag it with [checklist-model](http://stackoverflow.com/questions/tagged/checklist-model). | ||
## Development | ||
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`. | ||
### How to run tests | ||
1. Generate live demo *index.html* via `grunt jade` | ||
2. Run local http server `grunt server` | ||
3. Open in browser http://localhost:8000 to check that demo is accessible | ||
4. Open in browser http://localhost:8000/test and wait until all tests pass | ||
The best way to involve is to report an issue/enhancement and then provide a pull request for it using Github usual features. | ||
### How to add a new test case | ||
@@ -66,0 +75,0 @@ 1. Create a new folder under `docs/blocks` named `your-test`. |
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
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
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
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
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
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
110715
59
0
86
18
1045
1
- Removedangular@>=1.0.8