{"action":"created","issue":{"url":"https://api.github.com/repos/tb/ng2-nouislider/issues/29","repository_url":"https://api.github.com/repos/tb/ng2-nouislider","labels_url":"https://api.github.com/repos/tb/ng2-nouislider/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/tb/ng2-nouislider/issues/29/comments","events_url":"https://api.github.com/repos/tb/ng2-nouislider/issues/29/events","html_url":"https://github.com/tb/ng2-nouislider/issues/29","id":189730449,"number":29,"title":"Can't use custom format","user":{"login":"ryan-morris","id":7102450,"avatar_url":"https://avatars.githubusercontent.com/u/7102450?v=3","gravatar_id":"","url":"https://api.github.com/users/ryan-morris","html_url":"https://github.com/ryan-morris","followers_url":"https://api.github.com/users/ryan-morris/followers","following_url":"https://api.github.com/users/ryan-morris/following{/other_user}","gists_url":"https://api.github.com/users/ryan-morris/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-morris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-morris/subscriptions","organizations_url":"https://api.github.com/users/ryan-morris/orgs","repos_url":"https://api.github.com/users/ryan-morris/repos","events_url":"https://api.github.com/users/ryan-morris/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-morris/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-16T15:08:37Z","updated_at":"2016-11-20T17:24:49Z","closed_at":"2016-11-20T17:24:49Z","body":"In [noUiSlider](https://refreshless.com/nouislider/slider-read-write/) you can specify a custom format \r\n\r\n```\r\nformat: {\r\n\t  to: function ( value ) {\r\n\t\treturn '$' + value;\r\n\t  },\r\n\t  from: function ( value ) {\r\n\t\treturn value.substr(1);\r\n\t  }\r\n\t}\r\n```\r\n\r\nBy doing a parseFloat in toValue this breaks the ability to use a custom format involving strings. I [forked](https://github.com/devenvy/ng2-nouislider/commit/1ec8ad0d98452d61b9ea84b197cf078c49f4dcd9) and got rid of it, also change the type to 'any'. I'm not sure if this is the best solution as now the default behavior of returning 2 decimal places no longer works so tests fail. \r\n\r\nI can create a PR but I wanted to get some feedback on what the best way to handle this would be. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/tb/ng2-nouislider/issues/comments/261791675","html_url":"https://github.com/tb/ng2-nouislider/issues/29#issuecomment-261791675","issue_url":"https://api.github.com/repos/tb/ng2-nouislider/issues/29","id":261791675,"user":{"login":"tb","id":71683,"avatar_url":"https://avatars.githubusercontent.com/u/71683?v=3","gravatar_id":"","url":"https://api.github.com/users/tb","html_url":"https://github.com/tb","followers_url":"https://api.github.com/users/tb/followers","following_url":"https://api.github.com/users/tb/following{/other_user}","gists_url":"https://api.github.com/users/tb/gists{/gist_id}","starred_url":"https://api.github.com/users/tb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tb/subscriptions","organizations_url":"https://api.github.com/users/tb/orgs","repos_url":"https://api.github.com/users/tb/repos","events_url":"https://api.github.com/users/tb/events{/privacy}","received_events_url":"https://api.github.com/users/tb/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T17:24:49Z","updated_at":"2016-11-20T17:24:49Z","body":"Closed via https://github.com/tb/ng2-nouislider/pull/30"}}
{"actor":{"display_login":"tb"}}