{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/473","repository_url":"https://api.github.com/repos/aurelia/skeleton-navigation","labels_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/473/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/473/comments","events_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/473/events","html_url":"https://github.com/aurelia/skeleton-navigation/issues/473","id":158538106,"number":473,"title":"External library reference works in Webpack but not in JSPM within Aurelia","user":{"login":"vaskokj","id":59578,"avatar_url":"https://avatars.githubusercontent.com/u/59578?v=3","gravatar_id":"","url":"https://api.github.com/users/vaskokj","html_url":"https://github.com/vaskokj","followers_url":"https://api.github.com/users/vaskokj/followers","following_url":"https://api.github.com/users/vaskokj/following{/other_user}","gists_url":"https://api.github.com/users/vaskokj/gists{/gist_id}","starred_url":"https://api.github.com/users/vaskokj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaskokj/subscriptions","organizations_url":"https://api.github.com/users/vaskokj/orgs","repos_url":"https://api.github.com/users/vaskokj/repos","events_url":"https://api.github.com/users/vaskokj/events{/privacy}","received_events_url":"https://api.github.com/users/vaskokj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aurelia/skeleton-navigation/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2016-06-05T05:18:16Z","updated_at":"2016-10-11T19:54:53Z","closed_at":"2016-06-05T10:44:25Z","body":"I don't know if this is a framework or build issue or an issue I'm causing.\r\n\r\nI am trying to use the Datatables.net library in my Aurelia application.\r\n\r\nhttps://www.npmjs.com/package/datatables.net\r\n\r\nI added  \"datatables.net\": \"npm:datatables.net@^1.10.11\", to my package.json and did `jspm install -y` and datatables.net was said it was installed.\r\n\r\nThe issue is that the following code works with the Webpack version of Aurelia. The JSPM build I get the error\r\n\r\n`mytable.js:15 Uncaught (in promise) TypeError: $(...).DataTable is not a function(…)`\r\n\r\nThe following code works if I put it in the Webpack skeleton. \r\n\r\nViewModel:\r\n\r\n```\r\nimport $ from 'jquery';\r\nimport dataTable from 'datatables.net';\r\nexport class MyTable{\r\n  dataSet = [\r\n      ['Ken','Husband','Home'],\r\n      ['Barbie','Wife','Home']\r\n    ];\r\n  attached(){\r\n\r\n    //console.log(dataTable);\r\n    var dataSet = this.dataSet;\r\n    //console.log(dataSet);\r\n    //require( 'datatables.net' )( window, $ );\r\n    $(() =>     $('#example').DataTable({ \r\n        select: true,\r\n        data: dataSet,\r\n        columns: [\r\n        { title: \"Name\" },\r\n        { title: \"Position\" },\r\n        { title: \"Office\" }\r\n\r\n        ]\r\n    }) );\r\n  }\r\n }\r\n```\r\n\r\nView\r\n\r\n```\r\n<template>\r\n  <div class=\"container\" style=\"margin-top:20px\">\r\n    <div>test datatables</div>\r\n    <table id=\"example\" class=\"display\" width=\"100%\"></table>\r\n  </div>\r\n</template>\r\n```"},"comment":{"url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/comments/253026485","html_url":"https://github.com/aurelia/skeleton-navigation/issues/473#issuecomment-253026485","issue_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/473","id":253026485,"user":{"login":"amunology","id":3670976,"avatar_url":"https://avatars.githubusercontent.com/u/3670976?v=3","gravatar_id":"","url":"https://api.github.com/users/amunology","html_url":"https://github.com/amunology","followers_url":"https://api.github.com/users/amunology/followers","following_url":"https://api.github.com/users/amunology/following{/other_user}","gists_url":"https://api.github.com/users/amunology/gists{/gist_id}","starred_url":"https://api.github.com/users/amunology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amunology/subscriptions","organizations_url":"https://api.github.com/users/amunology/orgs","repos_url":"https://api.github.com/users/amunology/repos","events_url":"https://api.github.com/users/amunology/events{/privacy}","received_events_url":"https://api.github.com/users/amunology/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T19:54:53Z","updated_at":"2016-10-11T19:54:53Z","body":"@vaskokj : Okay. Mine wasn't working because I didn't add this line -- \"netBs.default();\" which I find really odd. Anyway, it works now, although the styling is a bit off."}}
{"actor":{"display_login":"amunology"}}