{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/14011","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/14011/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/14011/comments","events_url":"https://api.github.com/repos/angular/angular/issues/14011/events","html_url":"https://github.com/angular/angular/issues/14011","id":201893012,"number":14011,"title":"Error was occurred when angular application embed to webcomponent. ","user":{"login":"gorshkov-leonid","id":2270831,"avatar_url":"https://avatars.githubusercontent.com/u/2270831?v=3","gravatar_id":"","url":"https://api.github.com/users/gorshkov-leonid","html_url":"https://github.com/gorshkov-leonid","followers_url":"https://api.github.com/users/gorshkov-leonid/followers","following_url":"https://api.github.com/users/gorshkov-leonid/following{/other_user}","gists_url":"https://api.github.com/users/gorshkov-leonid/gists{/gist_id}","starred_url":"https://api.github.com/users/gorshkov-leonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorshkov-leonid/subscriptions","organizations_url":"https://api.github.com/users/gorshkov-leonid/orgs","repos_url":"https://api.github.com/users/gorshkov-leonid/repos","events_url":"https://api.github.com/users/gorshkov-leonid/events{/privacy}","received_events_url":"https://api.github.com/users/gorshkov-leonid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-01-19T15:35:09Z","updated_at":"2017-01-20T09:09:44Z","closed_at":null,"body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[ x] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\nError was occurred when angular application embed to webcomponent. \r\nI try to embed angular inside web component (adapted example from https://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5)\r\n```\r\nThe selector \"my-app\" did not match any elements\r\n    at DomRenderer.selectRootElement (https://unpkg.com/@angular/platform-browser/bundles/platform-browser.umd.js:2923:27) [angular]\r\n    at DebugDomRenderer.selectRootElement (https://unpkg.com/@angular/core/bundles/core.umd.js:11769:60) [angular]\r\n    at selectOrCreateRenderHostElement (https://unpkg.com/@angular/core/bundles/core.umd.js:7093:36) [angular]\r\n    at CompiledTemplate.proxyViewClass.View_App_Host0.createInternal (/AppModule/App/host.ngfactory.js:13:16) [angular]\r\n    at CompiledTemplate.proxyViewClass.AppView.createHostView (https://unpkg.com/@angular/core/bundles/core.umd.js:12409:25) [angular]\r\n    at CompiledTemplate.proxyViewClass.DebugAppView.createHostView (https://unpkg.com/@angular/core/bundles/core.umd.js:12817:56) [angular]\r\n    at ComponentFactory.create (https://unpkg.com/@angular/core/bundles/core.umd.js:7774:29) [angular]\r\n    at ApplicationRef_.bootstrap (https://unpkg.com/@angular/core/bundles/core.umd.js:8761:61) [angular]\r\n    at eval (https://unpkg.com/@angular/core/bundles/core.umd.js:8589:93) [angular]\r\n    at Array.forEach (native) [angular]\r\n    at PlatformRef_._moduleDoBootstrap (https://unpkg.com/@angular/core/bundles/core.umd.js:8589:46) [angular]\r\n    at eval (https://unpkg.com/@angular/core/bundles/core.umd.js:8541:31) [angular]\r\n    at Object.onInvoke (https://unpkg.com/@angular/core/bundles/core.umd.js:4435:41) [angular]\r\n```\r\nError in \r\n```\r\n   DomRenderer.prototype.selectRootElement = function (selectorOrNode, debugInfo) {\r\n            var /** @type {?} */ el;\r\n            if (typeof selectorOrNode === 'string') {\r\n                el = this._rootRenderer.document.querySelector(selectorOrNode);\r\n                if (!el) {\r\n                    throw new Error(\"The selector \\\"\" + selectorOrNode + \"\\\" did not match any elements\");\r\n                }\r\n            }\r\n```\r\n`this._rootRenderer.document` is root document - it is not webcomponent's document (can be obtained with document.currentScript.ownerDocument in webcomponent)\r\n\r\n**Expected behavior**\r\n\r\n**Minimal reproduction of the problem with instructions**\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\n\r\n**Please tell us about your environment:**\r\n* **Angular version:** 2.4.4\r\n* **Browser:** Chrome 55.0.2883.87\r\n* **Language:**  TypeScript \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/274017539","html_url":"https://github.com/angular/angular/issues/14011#issuecomment-274017539","issue_url":"https://api.github.com/repos/angular/angular/issues/14011","id":274017539,"user":{"login":"gorshkov-leonid","id":2270831,"avatar_url":"https://avatars.githubusercontent.com/u/2270831?v=3","gravatar_id":"","url":"https://api.github.com/users/gorshkov-leonid","html_url":"https://github.com/gorshkov-leonid","followers_url":"https://api.github.com/users/gorshkov-leonid/followers","following_url":"https://api.github.com/users/gorshkov-leonid/following{/other_user}","gists_url":"https://api.github.com/users/gorshkov-leonid/gists{/gist_id}","starred_url":"https://api.github.com/users/gorshkov-leonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorshkov-leonid/subscriptions","organizations_url":"https://api.github.com/users/gorshkov-leonid/orgs","repos_url":"https://api.github.com/users/gorshkov-leonid/repos","events_url":"https://api.github.com/users/gorshkov-leonid/events{/privacy}","received_events_url":"https://api.github.com/users/gorshkov-leonid/received_events","type":"User","site_admin":false},"created_at":"2017-01-20T09:09:44Z","updated_at":"2017-01-20T09:09:44Z","body":"Wow, \r\n```\r\n providers: [{provide: DOCUMENT, useValue: shadowRoot}]\r\n```\r\nThanks, but I concerned. shadowRoot does not implement Document's contract. In future may be  problem."}}
{"actor":{"display_login":"gorshkov-leonid"}}