{"action":"created","issue":{"url":"https://api.github.com/repos/Ni55aN/d3-node-editor/issues/97","repository_url":"https://api.github.com/repos/Ni55aN/d3-node-editor","labels_url":"https://api.github.com/repos/Ni55aN/d3-node-editor/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/Ni55aN/d3-node-editor/issues/97/comments","events_url":"https://api.github.com/repos/Ni55aN/d3-node-editor/issues/97/events","html_url":"https://github.com/Ni55aN/d3-node-editor/issues/97","id":321114644,"number":97,"title":"not working event click by button","user":{"login":"manvfx","id":6747872,"avatar_url":"https://avatars3.githubusercontent.com/u/6747872?v=4","gravatar_id":"","url":"https://api.github.com/users/manvfx","html_url":"https://github.com/manvfx","followers_url":"https://api.github.com/users/manvfx/followers","following_url":"https://api.github.com/users/manvfx/following{/other_user}","gists_url":"https://api.github.com/users/manvfx/gists{/gist_id}","starred_url":"https://api.github.com/users/manvfx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manvfx/subscriptions","organizations_url":"https://api.github.com/users/manvfx/orgs","repos_url":"https://api.github.com/users/manvfx/repos","events_url":"https://api.github.com/users/manvfx/events{/privacy}","received_events_url":"https://api.github.com/users/manvfx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-05-08T09:42:43Z","updated_at":"2018-05-10T07:53:53Z","closed_at":null,"author_association":"NONE","body":"I want show dialog click by button in node with angular. but not working event\r\n\r\nmy code is:\r\n```\r\n<button type=\"button\" (click)=\"doEditColumnTableEtl()\">show dialog</button>\r\n```\r\n\r\nfull code:\r\n```\r\nthis.componentEditColumn = new D3NE.Component(this.nodeTitle, {\r\n         builder(node) {\r\n          const inp1 = new D3NE.Input('input', numSocket);\r\n          const out = new D3NE.Output('output', numSocket);\r\n          const inl = new D3NE.Node('nm,m')\r\n            const numControl = new D3NE.Control(\r\n               '<button type=\"button\" (click)=\"doEditColumnTableEtl()\">show dialog</button>',\r\n               (el: HTMLInputElement, control: any) => {\r\n                  control.setValue = val => {\r\n                     el.value = val;\r\n                  };\r\n               }\r\n            );\r\n\r\n            return node\r\n               .addInput(inp1)\r\n               .addControl(numControl)               \r\n               .addOutput(out);\r\n         },\r\n         worker(node, inputs, outputs) {\r\n          const sum = inputs[0][0] + inputs[1][0];\r\n            (<any>self.editor.nodes.find(n => n.id === node.id).controls[0]).setValue(sum);\r\n            outputs[0] = sum;\r\n         }\r\n      });\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Ni55aN/d3-node-editor/issues/comments/387980810","html_url":"https://github.com/Ni55aN/d3-node-editor/issues/97#issuecomment-387980810","issue_url":"https://api.github.com/repos/Ni55aN/d3-node-editor/issues/97","id":387980810,"user":{"login":"Ni55aN","id":8259641,"avatar_url":"https://avatars3.githubusercontent.com/u/8259641?v=4","gravatar_id":"","url":"https://api.github.com/users/Ni55aN","html_url":"https://github.com/Ni55aN","followers_url":"https://api.github.com/users/Ni55aN/followers","following_url":"https://api.github.com/users/Ni55aN/following{/other_user}","gists_url":"https://api.github.com/users/Ni55aN/gists{/gist_id}","starred_url":"https://api.github.com/users/Ni55aN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ni55aN/subscriptions","organizations_url":"https://api.github.com/users/Ni55aN/orgs","repos_url":"https://api.github.com/users/Ni55aN/repos","events_url":"https://api.github.com/users/Ni55aN/events{/privacy}","received_events_url":"https://api.github.com/users/Ni55aN/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T07:53:53Z","updated_at":"2018-05-10T07:53:53Z","author_association":"OWNER","body":"Always check what you have in `this` when such errors occur\r\n\r\n`this` inside doEditColumnTableEtl doesn't refers to Angular Component,so you need to explicitly bind the context:\r\n```js\r\nel.addEventListener(\"click\", this.doEditColumnTableEtl.bind(this));\r\n```"}}
{"actor":{"display_login":"Ni55aN"}}