{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-select2/issues/58","repository_url":"https://api.github.com/repos/angular-ui/ui-select2","labels_url":"https://api.github.com/repos/angular-ui/ui-select2/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-select2/issues/58/comments","events_url":"https://api.github.com/repos/angular-ui/ui-select2/issues/58/events","html_url":"https://github.com/angular-ui/ui-select2/issues/58","id":18124655,"number":58,"title":"Variable set to ng-model firing $scope.$watch twice","user":{"login":"paolodm","id":247525,"avatar_url":"https://avatars.githubusercontent.com/u/247525?v=3","gravatar_id":"","url":"https://api.github.com/users/paolodm","html_url":"https://github.com/paolodm","followers_url":"https://api.github.com/users/paolodm/followers","following_url":"https://api.github.com/users/paolodm/following{/other_user}","gists_url":"https://api.github.com/users/paolodm/gists{/gist_id}","starred_url":"https://api.github.com/users/paolodm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paolodm/subscriptions","organizations_url":"https://api.github.com/users/paolodm/orgs","repos_url":"https://api.github.com/users/paolodm/repos","events_url":"https://api.github.com/users/paolodm/events{/privacy}","received_events_url":"https://api.github.com/users/paolodm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2013-08-15T20:07:14Z","updated_at":"2016-05-09T02:16:37Z","closed_at":null,"body":"In html:\r\n```html\r\n<select ng-model=\"selectedValue\">\r\n```\r\nIn js:\r\n```js\r\n$scope.selectedValue = 4; // we set the value to an integer\r\n\r\n$scope.$watch('selectedValue', function() {\r\n    // this is fired twice\r\n});\r\n```\r\n\r\nI think this is because select2 stores the values as strings. When we set the value as an integer, ui-select2 converts it to a string. So it is fired first when we change to an integer, and it is fired a second time around when ui-select2 converts it to a string.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-select2/issues/comments/217762974","html_url":"https://github.com/angular-ui/ui-select2/issues/58#issuecomment-217762974","issue_url":"https://api.github.com/repos/angular-ui/ui-select2/issues/58","id":217762974,"user":{"login":"richfergus","id":3022373,"avatar_url":"https://avatars.githubusercontent.com/u/3022373?v=3","gravatar_id":"","url":"https://api.github.com/users/richfergus","html_url":"https://github.com/richfergus","followers_url":"https://api.github.com/users/richfergus/followers","following_url":"https://api.github.com/users/richfergus/following{/other_user}","gists_url":"https://api.github.com/users/richfergus/gists{/gist_id}","starred_url":"https://api.github.com/users/richfergus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richfergus/subscriptions","organizations_url":"https://api.github.com/users/richfergus/orgs","repos_url":"https://api.github.com/users/richfergus/repos","events_url":"https://api.github.com/users/richfergus/events{/privacy}","received_events_url":"https://api.github.com/users/richfergus/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T02:16:37Z","updated_at":"2016-05-09T02:16:37Z","body":"+1 I am having the same issue \r\n\r\n` $scope.Update = function(id, statusChange) {\r\n                    console.log(statusChange, id)        \r\n                },`\r\n\r\nRenders 2 times in the console:\r\n\r\n![screen shot 2016-05-08 at 10 14 34 pm](https://cloud.githubusercontent.com/assets/3022373/15102196/5fa40d1e-156a-11e6-8c35-8c6162dae042.png)"}}