{"action":"created","issue":{"url":"https://api.github.com/repos/Yankovsky/nouislider-angular/issues/6","labels_url":"https://api.github.com/repos/Yankovsky/nouislider-angular/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Yankovsky/nouislider-angular/issues/6/comments","events_url":"https://api.github.com/repos/Yankovsky/nouislider-angular/issues/6/events","html_url":"https://github.com/Yankovsky/nouislider-angular/issues/6","id":108871599,"number":6,"title":"It brokes array","user":{"login":"Kopleman","id":3992563,"avatar_url":"https://avatars.githubusercontent.com/u/3992563?v=3","gravatar_id":"","url":"https://api.github.com/users/Kopleman","html_url":"https://github.com/Kopleman","followers_url":"https://api.github.com/users/Kopleman/followers","following_url":"https://api.github.com/users/Kopleman/following{/other_user}","gists_url":"https://api.github.com/users/Kopleman/gists{/gist_id}","starred_url":"https://api.github.com/users/Kopleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kopleman/subscriptions","organizations_url":"https://api.github.com/users/Kopleman/orgs","repos_url":"https://api.github.com/users/Kopleman/repos","events_url":"https://api.github.com/users/Kopleman/events{/privacy}","received_events_url":"https://api.github.com/users/Kopleman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-29T13:41:38Z","updated_at":"2015-10-28T03:38:31Z","closed_at":"2015-10-28T03:38:31Z","body":"Current version is broken, $scope.values = [60, 90]; after triggering directive leads to $scope.values =  60; problem coused by this code: \r\n\r\n`value = element.noUiSlider.get();\r\nvar valueIsArray = angular.isArray(value);\r\nif (valueIsArray) value = value[0];`\r\n\r\ni rewrited function and have this one : \r\n`function () {\r\nvalue = element.noUiSlider.get();\r\nvar valueIsArray = angular.isArray(value);\r\n if (valueIsArray) {\r\n      value = [parseFloat(value[0]) || scope.noUiSlider.range.min, parseFloat(value[1]) ||        scope.noUiSlider.range.max];\r\n                                value = [\r\n                                        Math.min(Math.max(value[0], scope.noUiSlider.range.min), scope.noUiSlider.range.max),\r\n                                        Math.min(Math.max(value[1], scope.noUiSlider.range.min), scope.noUiSlider.range.max)\r\n                                ];\r\n                            } else {\r\n                                value = parseFloat(value) || 0;\r\n                                value = Math.min(Math.max(value, scope.noUiSlider.range.min), scope.noUiSlider.range.max);\r\n                            }  \r\n                            newValue = value;\r\n                            ngModel.$setViewValue(newValue);\r\n                        });`\r\n\r\nworks fine atm with arrays and single values"},"comment":{"url":"https://api.github.com/repos/Yankovsky/nouislider-angular/issues/comments/151712951","html_url":"https://github.com/Yankovsky/nouislider-angular/issues/6#issuecomment-151712951","issue_url":"https://api.github.com/repos/Yankovsky/nouislider-angular/issues/6","id":151712951,"user":{"login":"Yankovsky","id":72094,"avatar_url":"https://avatars.githubusercontent.com/u/72094?v=3","gravatar_id":"","url":"https://api.github.com/users/Yankovsky","html_url":"https://github.com/Yankovsky","followers_url":"https://api.github.com/users/Yankovsky/followers","following_url":"https://api.github.com/users/Yankovsky/following{/other_user}","gists_url":"https://api.github.com/users/Yankovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/Yankovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yankovsky/subscriptions","organizations_url":"https://api.github.com/users/Yankovsky/orgs","repos_url":"https://api.github.com/users/Yankovsky/repos","events_url":"https://api.github.com/users/Yankovsky/events{/privacy}","received_events_url":"https://api.github.com/users/Yankovsky/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T03:38:31Z","updated_at":"2015-10-28T03:38:31Z","body":"@Kopleman Hello! Please check new version of plugin, it shouldn't have this problem."}}