{"action":"created","issue":{"url":"https://api.github.com/repos/BenGale/BenGale.github.io/issues/3","labels_url":"https://api.github.com/repos/BenGale/BenGale.github.io/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/BenGale/BenGale.github.io/issues/3/comments","events_url":"https://api.github.com/repos/BenGale/BenGale.github.io/issues/3/events","html_url":"https://github.com/BenGale/BenGale.github.io/issues/3","id":55668356,"number":3,"title":"ngModel","user":{"login":"BenGale","id":1517604,"avatar_url":"https://avatars.githubusercontent.com/u/1517604?v=3","gravatar_id":"","url":"https://api.github.com/users/BenGale","html_url":"https://github.com/BenGale","followers_url":"https://api.github.com/users/BenGale/followers","following_url":"https://api.github.com/users/BenGale/following{/other_user}","gists_url":"https://api.github.com/users/BenGale/gists{/gist_id}","starred_url":"https://api.github.com/users/BenGale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenGale/subscriptions","organizations_url":"https://api.github.com/users/BenGale/orgs","repos_url":"https://api.github.com/users/BenGale/repos","events_url":"https://api.github.com/users/BenGale/events{/privacy}","received_events_url":"https://api.github.com/users/BenGale/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BenGale/BenGale.github.io/labels/0%20-%20Backlog","name":"0 - Backlog","color":"CCCCCC"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-27T20:12:30Z","updated_at":"2015-01-27T20:13:33Z","closed_at":null,"body":"\r\n\r\n<!---\r\n@huboard:{}\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/BenGale/BenGale.github.io/issues/comments/71719241","html_url":"https://github.com/BenGale/BenGale.github.io/issues/3#issuecomment-71719241","issue_url":"https://api.github.com/repos/BenGale/BenGale.github.io/issues/3","id":71719241,"user":{"login":"BenGale","id":1517604,"avatar_url":"https://avatars.githubusercontent.com/u/1517604?v=3","gravatar_id":"","url":"https://api.github.com/users/BenGale","html_url":"https://github.com/BenGale","followers_url":"https://api.github.com/users/BenGale/followers","following_url":"https://api.github.com/users/BenGale/following{/other_user}","gists_url":"https://api.github.com/users/BenGale/gists{/gist_id}","starred_url":"https://api.github.com/users/BenGale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenGale/subscriptions","organizations_url":"https://api.github.com/users/BenGale/orgs","repos_url":"https://api.github.com/users/BenGale/repos","events_url":"https://api.github.com/users/BenGale/events{/privacy}","received_events_url":"https://api.github.com/users/BenGale/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T20:13:33Z","updated_at":"2015-01-27T20:13:33Z","body":"Write a post about the ngModel stuff in angular. How you can use it to avoid the $watch stuff in the controller.\nhttps://docs.angularjs.org/guide/directive\n\nLook at code from WorkLifeLog:\nlink: function(scope, element, attr, ctrl) {\n        var ratingCtrl = ctrl[0];\n        var ngModelCtrl = ctrl[1];\n        if ( ngModelCtrl ) {\n          ratingCtrl.init( ngModelCtrl );\n        }\n      },\n      controller: \"scoreDirective as ctrl\",\n      templateUrl: \"app/log/directives/scoreDirective/score-view.html\"\n    };\n\n    vm.init = function(_ngModelCtrl) {\n      ngModelCtrl = _ngModelCtrl;\n    };\n\n    vm.onRate = function(score) {\n      ngModelCtrl.$setViewValue(score);\n      ngModelCtrl.$render();\n    };"}}