Skip to content

Commit

Permalink
#7 onSlide/onSlideEnd binding issue
Browse files Browse the repository at this point in the history
  • Loading branch information
princejwesley committed Jul 30, 2015
1 parent 09843b8 commit 5a1ea28
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ var app = angular.module('yourApp',
shape='{{shape}}'
touch="true"
animate='true'
on-slide='onSlide(value)'
on-slide-end='onSlideEnd(value)'
on-slide='onSlide'
on-slide-end='onSlideEnd'
min="min"
max="200"
value="value">
Expand Down Expand Up @@ -146,8 +146,8 @@ scope: {
animateDuration: '=?',
selectable: '=?',
disabled: '=?'
onSlide: '&',
onSlideEnd: '&',
onSlide: '=',
onSlideEnd: '=',
},
```
### Watchers
Expand Down
2 changes: 1 addition & 1 deletion dist/css/angular-circular-slider.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/angular-circular-slider.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions examples/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@

<body ng-controller="test">
<script>

var app = angular.module('test-cs', ['angular.circular-slider']);
app.controller('test', function ($scope) {
$scope.min = 10;
$scope.max = 100;
$scope.shape='Circle';
$scope.value = 20;

$scope.onSlide = function(value) {
$scope.onSlide = function onSlide (value) {
console.log('on slide ' + value);
}

$scope.onSlideEnd = function(value) {
$scope.onSlideEnd = function onSlideEnd(value) {
console.log('on slide end ' + value);
}
});
</script>

<h2> circular slider directive </h2>
<circular-slider class='my-slider' shape='{{shape}}' touch="true" animate='true' on-slide='onSlide(value)' on-slide-end='onSlideEnd(value)' min="min" max="200" value="value">
<circular-slider class='my-slider' shape='{{shape}}' touch="true" animate='true' on-slide='onSlide' on-slide-end='onSlideEnd' min="min" max="200" value="value">
{{value}}
</circular-slider>
</body>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-circular-slider",
"version": "1.0.0",
"version": "1.0.1",
"author": "prince john wesley <[email protected]>",
"description": "Angular circular slider",
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/js/angular-circular-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ Copyright (c) 2015 Prince John Wesley ([email protected])
animateDuration: '=?',
selectable: '=?',
disabled: '=?',
onSlide: '&',
onSlideEnd: '&',
onSlide: '=',
onSlideEnd: '=',
},
link: link,
};
Expand Down

0 comments on commit 5a1ea28

Please sign in to comment.