checklist-model
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -82,6 +82,8 @@ /** | ||
var current = getter(scope.$parent); | ||
if (newValue === true) { | ||
setter(scope.$parent, add(current, value, comparator)); | ||
} else { | ||
setter(scope.$parent, remove(current, value, comparator)); | ||
if (angular.isFunction(setter)) { | ||
if (newValue === true) { | ||
setter(scope.$parent, add(current, value, comparator)); | ||
} else { | ||
setter(scope.$parent, remove(current, value, comparator)); | ||
} | ||
} | ||
@@ -88,0 +90,0 @@ |
{ | ||
"name": "checklist-model", | ||
"description": "AngularJS directive for list of checkboxes", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"homepage": "http://vitalets.github.io/checklist-model", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -1,5 +0,5 @@ | ||
## checklist-model | ||
# checklist-model | ||
AngularJS directive for list of checkboxes | ||
### Why this is needed? | ||
## Why this is needed? | ||
In Angular one checkbox `<input type="checkbox" ng-model="...">` is linked | ||
@@ -20,3 +20,3 @@ with one model. | ||
### Installation | ||
## Installation | ||
1. [Download latest release](https://github.com/vitalets/checklist-model/releases) or use bower: | ||
@@ -32,3 +32,3 @@ ```` | ||
### Development | ||
## 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`. | ||
@@ -38,3 +38,12 @@ | ||
### License | ||
MIT | ||
### How to add a new test case | ||
1. Create a new folder under `docs/blocks` named `your-test`. | ||
2. Create under that folder `ctrl.js` to describe the test Angular controller, `view.html` to describe the view part in HTML and `test.js` for the Angular scenario test. You can use an existing test as an example. | ||
3. Add a line like `- items.push({id: 'your-test', text: 'Your test, ctrlName: 'CtrlTestName', testValue: 'selectedItems'})` to `docs/index.jade` | ||
4. Add a line like `<script src="../docs/blocks/your-test/test.js"></script>` to `test\index.html` | ||
5. Run `grunt jade` to generate `index.html` from `docs/index.jade` | ||
6. Run `grunt server` | ||
7. Access `http://localhost:8000` for samples and `http://localhost:8000/test` for running the tests. | ||
## License | ||
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
3371056
90
77426
47