{"action":"created","issue":{"url":"https://api.github.com/repos/priologic/easyrtc/issues/331","repository_url":"https://api.github.com/repos/priologic/easyrtc","labels_url":"https://api.github.com/repos/priologic/easyrtc/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/priologic/easyrtc/issues/331/comments","events_url":"https://api.github.com/repos/priologic/easyrtc/issues/331/events","html_url":"https://github.com/priologic/easyrtc/issues/331","id":246247262,"number":331,"title":"Angular 4 support","user":{"login":"Thomas-Ahn","id":16425331,"avatar_url":"https://avatars3.githubusercontent.com/u/16425331?v=4","gravatar_id":"","url":"https://api.github.com/users/Thomas-Ahn","html_url":"https://github.com/Thomas-Ahn","followers_url":"https://api.github.com/users/Thomas-Ahn/followers","following_url":"https://api.github.com/users/Thomas-Ahn/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Ahn/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Ahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Ahn/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Ahn/orgs","repos_url":"https://api.github.com/users/Thomas-Ahn/repos","events_url":"https://api.github.com/users/Thomas-Ahn/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Ahn/received_events","type":"User","site_admin":false},"labels":[{"id":628745753,"url":"https://api.github.com/repos/priologic/easyrtc/labels/TypeScript","name":"TypeScript","color":"fef2c0","default":false},{"id":22691200,"url":"https://api.github.com/repos/priologic/easyrtc/labels/documentation","name":"documentation","color":"c2e0c6","default":false},{"id":21753495,"url":"https://api.github.com/repos/priologic/easyrtc/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"Thomas-Ahn","id":16425331,"avatar_url":"https://avatars3.githubusercontent.com/u/16425331?v=4","gravatar_id":"","url":"https://api.github.com/users/Thomas-Ahn","html_url":"https://github.com/Thomas-Ahn","followers_url":"https://api.github.com/users/Thomas-Ahn/followers","following_url":"https://api.github.com/users/Thomas-Ahn/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Ahn/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Ahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Ahn/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Ahn/orgs","repos_url":"https://api.github.com/users/Thomas-Ahn/repos","events_url":"https://api.github.com/users/Thomas-Ahn/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Ahn/received_events","type":"User","site_admin":false},"assignees":[{"login":"Thomas-Ahn","id":16425331,"avatar_url":"https://avatars3.githubusercontent.com/u/16425331?v=4","gravatar_id":"","url":"https://api.github.com/users/Thomas-Ahn","html_url":"https://github.com/Thomas-Ahn","followers_url":"https://api.github.com/users/Thomas-Ahn/followers","following_url":"https://api.github.com/users/Thomas-Ahn/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-Ahn/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-Ahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-Ahn/subscriptions","organizations_url":"https://api.github.com/users/Thomas-Ahn/orgs","repos_url":"https://api.github.com/users/Thomas-Ahn/repos","events_url":"https://api.github.com/users/Thomas-Ahn/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-Ahn/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/priologic/easyrtc/milestones/15","html_url":"https://github.com/priologic/easyrtc/milestone/15","labels_url":"https://api.github.com/repos/priologic/easyrtc/milestones/15/labels","id":3016654,"number":15,"title":"v1.1.1 - Server and API maintenance ","description":"","creator":{"login":"hthetiot","id":8635,"avatar_url":"https://avatars0.githubusercontent.com/u/8635?v=4","gravatar_id":"","url":"https://api.github.com/users/hthetiot","html_url":"https://github.com/hthetiot","followers_url":"https://api.github.com/users/hthetiot/followers","following_url":"https://api.github.com/users/hthetiot/following{/other_user}","gists_url":"https://api.github.com/users/hthetiot/gists{/gist_id}","starred_url":"https://api.github.com/users/hthetiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hthetiot/subscriptions","organizations_url":"https://api.github.com/users/hthetiot/orgs","repos_url":"https://api.github.com/users/hthetiot/repos","events_url":"https://api.github.com/users/hthetiot/events{/privacy}","received_events_url":"https://api.github.com/users/hthetiot/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":27,"state":"open","created_at":"2018-01-06T15:37:55Z","updated_at":"2018-03-15T22:34:06Z","due_on":"2018-01-07T08:00:00Z","closed_at":null},"comments":7,"created_at":"2017-07-28T05:49:28Z","updated_at":"2018-03-15T22:38:34Z","closed_at":null,"author_association":"NONE","body":"I've tried to use the beta typescript-support library on angular 4 w/ tsc 2.4.1, but I got an error,\r\nERROR ReferenceError: easyrtc is not defined\r\n    at AppComponent.webpackJsonp.113.AppComponent.connect (app.component.ts:57)\r\n    at AppComponent.webpackJsonp.113.AppComponent.ngAfterViewInit (app.component.ts:66)\r\n\r\nTo migrate to angular 4, is there any consideration or modification required?\r\n\r\nTo access the demo, here is what I have done.\r\n1. create an angular 4 project under easyrtc home directory with angular-demo-app\r\n    ng new angular-demo-app\r\n2. cut and paste suggest three files accordingly:\r\n   app/app.component.ts --> src/app/app.component.ts\r\n   app/partials/app.html --> src/app/app.component.html\r\n   app/style.css --> src/app/app.component.css \r\n\r\n3. start application\r\n   ng serve --host x.x.x\r\n4. access url xxx:4200 from browser..\r\n5. got sample web page with console error,  such as easyrtc not defined even though the reference (easyrtc.d.ts) is correct..\r\n\r\nI wonder whether above my test procedure is correct or not, since there is no communication channel for easyrtc and socket.io...\r\n\r\n-Thomas."},"comment":{"url":"https://api.github.com/repos/priologic/easyrtc/issues/comments/373545301","html_url":"https://github.com/priologic/easyrtc/issues/331#issuecomment-373545301","issue_url":"https://api.github.com/repos/priologic/easyrtc/issues/331","id":373545301,"user":{"login":"hthetiot","id":8635,"avatar_url":"https://avatars0.githubusercontent.com/u/8635?v=4","gravatar_id":"","url":"https://api.github.com/users/hthetiot","html_url":"https://github.com/hthetiot","followers_url":"https://api.github.com/users/hthetiot/followers","following_url":"https://api.github.com/users/hthetiot/following{/other_user}","gists_url":"https://api.github.com/users/hthetiot/gists{/gist_id}","starred_url":"https://api.github.com/users/hthetiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hthetiot/subscriptions","organizations_url":"https://api.github.com/users/hthetiot/orgs","repos_url":"https://api.github.com/users/hthetiot/repos","events_url":"https://api.github.com/users/hthetiot/events{/privacy}","received_events_url":"https://api.github.com/users/hthetiot/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T22:38:34Z","updated_at":"2018-03-15T22:38:34Z","author_association":"COLLABORATOR","body":"@olfa-DEV It look like webpack is making socker.io loading AMD style but easyrtc still load Vanilla JS and do not find socker.io `window.io` global.\r\n\r\n```js\r\n(function (root, factory) {\r\n    if (typeof define === 'function' && define.amd) {\r\n        //RequireJS (AMD) build system\r\n        define(['easyrtc_lang', 'webrtc-adapter', 'socket.io'], factory);\r\n    } else if (typeof module === 'object' && module.exports) {\r\n        //CommonJS build system\r\n        module.exports = factory(require('easyrtc_lang'), require('webrtc-adapter'), require('socket.io'));\r\n    } else {\r\n        //Vanilla JS, ensure dependencies are loaded correctly\r\n        if (typeof window.io === 'undefined' || !window.io) {\r\n            throw new Error(\"easyrtc requires socket.io\");\r\n        }\r\n        root.easyrtc = factory(window.easyrtc_lang, window.adapter, window.io);\r\n  }\r\n}(this, function (easyrtc_lang, adapter, io, undefined) {\r\n```"}}
{"actor":{"display_login":"hthetiot"}}