{"action":"created","issue":{"url":"https://api.github.com/repos/10KB/angular-clndr/issues/16","repository_url":"https://api.github.com/repos/10KB/angular-clndr","labels_url":"https://api.github.com/repos/10KB/angular-clndr/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/10KB/angular-clndr/issues/16/comments","events_url":"https://api.github.com/repos/10KB/angular-clndr/issues/16/events","html_url":"https://github.com/10KB/angular-clndr/issues/16","id":147862027,"number":16,"title":"clickEvents options not working","user":{"login":"oa495","id":8635106,"avatar_url":"https://avatars.githubusercontent.com/u/8635106?v=3","gravatar_id":"","url":"https://api.github.com/users/oa495","html_url":"https://github.com/oa495","followers_url":"https://api.github.com/users/oa495/followers","following_url":"https://api.github.com/users/oa495/following{/other_user}","gists_url":"https://api.github.com/users/oa495/gists{/gist_id}","starred_url":"https://api.github.com/users/oa495/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oa495/subscriptions","organizations_url":"https://api.github.com/users/oa495/orgs","repos_url":"https://api.github.com/users/oa495/repos","events_url":"https://api.github.com/users/oa495/events{/privacy}","received_events_url":"https://api.github.com/users/oa495/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-04-12T20:18:09Z","updated_at":"2016-08-23T16:31:12Z","closed_at":"2016-08-23T16:31:12Z","body":"So I tried to set up the options like this:  \r\n`$scope.options = {\r\ndaysOfTheWeek: ['ZO', 'MA', 'DI', 'WO', 'DO', 'VR', 'ZA'],\r\n  \t\tclickEvents: {\r\n  \t\t\tclick: function(target) {\r\n\t\t  \t },\r\n  \t\t \tonMonthChange: function (month) {\r\n  \t\t \t\tconsole.log('changed month');\r\n  \t\t \t},\r\n  \t\t \tonYearChange: function (year) {\r\n  \t\t \t\tconsole.log('changed year');\r\n  \t\t \t}\r\n  \t\t }\r\n   \t };`\r\nIt changes the days of the week but none of the click events seem to be firing. Should I just use an ng-click or is this supposed to be implemented in some other way?"},"comment":{"url":"https://api.github.com/repos/10KB/angular-clndr/issues/comments/241792648","html_url":"https://github.com/10KB/angular-clndr/issues/16#issuecomment-241792648","issue_url":"https://api.github.com/repos/10KB/angular-clndr/issues/16","id":241792648,"user":{"login":"rolandboon","id":1085339,"avatar_url":"https://avatars.githubusercontent.com/u/1085339?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandboon","html_url":"https://github.com/rolandboon","followers_url":"https://api.github.com/users/rolandboon/followers","following_url":"https://api.github.com/users/rolandboon/following{/other_user}","gists_url":"https://api.github.com/users/rolandboon/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandboon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandboon/subscriptions","organizations_url":"https://api.github.com/users/rolandboon/orgs","repos_url":"https://api.github.com/users/rolandboon/repos","events_url":"https://api.github.com/users/rolandboon/events{/privacy}","received_events_url":"https://api.github.com/users/rolandboon/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T16:31:12Z","updated_at":"2016-08-23T16:31:12Z","body":"The clickEvents on CLNDR are indeed not binded on the transcluded Angular template. You can find the binding of the click event by CLNDR on https://github.com/kylestetz/CLNDR/blob/fb4051a4fd3bcf25103a96b0e07139f9f6aba3e8/src/clndr.js#L905\r\n\r\nHowever, since we initiate CLNDR on an empty unused div-element that's not injected in the DOM (https://github.com/10KB/angular-clndr/blob/fff31452afa25953223d8a48eedd86fb7fb9e585/angular-clndr.js#L34). These events will never trigger.\r\n\r\nI would recommend to bind clicks events by using ng-click. You probably want to do something with a $scope variable in your click event and by using ng-click you ensure a $apply is triggered."}}
{"actor":{"display_login":"rolandboon"}}