{"action":"created","issue":{"url":"https://api.github.com/repos/Caged/d3-tip/issues/181","repository_url":"https://api.github.com/repos/Caged/d3-tip","labels_url":"https://api.github.com/repos/Caged/d3-tip/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/Caged/d3-tip/issues/181/comments","events_url":"https://api.github.com/repos/Caged/d3-tip/issues/181/events","html_url":"https://github.com/Caged/d3-tip/issues/181","id":192541118,"node_id":"MDU6SXNzdWUxOTI1NDExMTg=","number":181,"title":"Very hard to use with angular2 cli","user":{"login":"Joegrundman","id":12559821,"node_id":"MDQ6VXNlcjEyNTU5ODIx","avatar_url":"https://avatars2.githubusercontent.com/u/12559821?v=4","gravatar_id":"","url":"https://api.github.com/users/Joegrundman","html_url":"https://github.com/Joegrundman","followers_url":"https://api.github.com/users/Joegrundman/followers","following_url":"https://api.github.com/users/Joegrundman/following{/other_user}","gists_url":"https://api.github.com/users/Joegrundman/gists{/gist_id}","starred_url":"https://api.github.com/users/Joegrundman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joegrundman/subscriptions","organizations_url":"https://api.github.com/users/Joegrundman/orgs","repos_url":"https://api.github.com/users/Joegrundman/repos","events_url":"https://api.github.com/users/Joegrundman/events{/privacy}","received_events_url":"https://api.github.com/users/Joegrundman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-11-30T11:25:39Z","updated_at":"2019-05-10T11:14:01Z","closed_at":"2016-12-02T03:08:48Z","author_association":"NONE","body":"The angular2 cli uses webpack to bundle the files, and really I have no idea how to integrate d3-tip.\r\n\r\nd3 can be imported using\r\n\r\nimport * as d3 from 'd3'\r\n\r\nbut importing * as d3tip from 'd3-tip' for example doesn't work\r\n\r\nThere is also an option to install globally using the scripts field in angular-cli.json, but this also seems not to work\r\n\r\ncan anyone recommend how to do this, and what might be the problem?\r\n\r\nWhen I import it, i can see  the file in the console, but i get the following message\r\n\r\n```\r\nEXCEPTION: Uncaught (in promise): TypeError: __WEBPACK_IMPORTED_MODULE_1_d3__.tip is not a function\r\nTypeError: __WEBPACK_IMPORTED_MODULE_1_d3__.tip is not a function\r\n```"},"comment":{"url":"https://api.github.com/repos/Caged/d3-tip/issues/comments/491252678","html_url":"https://github.com/Caged/d3-tip/issues/181#issuecomment-491252678","issue_url":"https://api.github.com/repos/Caged/d3-tip/issues/181","id":491252678,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5MTI1MjY3OA==","user":{"login":"vijaykanta","id":1988693,"node_id":"MDQ6VXNlcjE5ODg2OTM=","avatar_url":"https://avatars2.githubusercontent.com/u/1988693?v=4","gravatar_id":"","url":"https://api.github.com/users/vijaykanta","html_url":"https://github.com/vijaykanta","followers_url":"https://api.github.com/users/vijaykanta/followers","following_url":"https://api.github.com/users/vijaykanta/following{/other_user}","gists_url":"https://api.github.com/users/vijaykanta/gists{/gist_id}","starred_url":"https://api.github.com/users/vijaykanta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijaykanta/subscriptions","organizations_url":"https://api.github.com/users/vijaykanta/orgs","repos_url":"https://api.github.com/users/vijaykanta/repos","events_url":"https://api.github.com/users/vijaykanta/events{/privacy}","received_events_url":"https://api.github.com/users/vijaykanta/received_events","type":"User","site_admin":false},"created_at":"2019-05-10T11:14:01Z","updated_at":"2019-05-10T11:14:01Z","author_association":"NONE","body":"Okay, so going through many SO posts and tuts around, I found the d3-tip typings lib to be the culprit. I had to silently uninstall this\r\n`npm uninstall @types/d3-tip`\r\nThen I make changes like\r\n```\r\nimport * as d3 from 'd3';\r\nimport * as d3Tip from 'd3-tip';\r\n....\r\n\r\nconst tip = d3Tip.default()\r\n.attr('class', 'd3-tip')\r\n....\r\n```\r\nThis tip can be used anywhere like\r\n```\r\nsvg.call(tip)\r\n// or\r\ntip.show()\r\ntip.hide()\r\n```\r\nThen I stop/start the angular server, the errors are all gone. Now hoping it will work finally. :)"}}
{"actor":{"display_login":"vijaykanta"}}