{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/polymer/issues/1830","labels_url":"https://api.github.com/repos/Polymer/polymer/issues/1830/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer/issues/1830/comments","events_url":"https://api.github.com/repos/Polymer/polymer/issues/1830/events","html_url":"https://github.com/Polymer/polymer/issues/1830","id":87312548,"number":1830,"title":"Polymer 1.0.x and Meteor Blaze","user":{"login":"tdesc","id":1006137,"avatar_url":"https://avatars.githubusercontent.com/u/1006137?v=3","gravatar_id":"","url":"https://api.github.com/users/tdesc","html_url":"https://github.com/tdesc","followers_url":"https://api.github.com/users/tdesc/followers","following_url":"https://api.github.com/users/tdesc/following{/other_user}","gists_url":"https://api.github.com/users/tdesc/gists{/gist_id}","starred_url":"https://api.github.com/users/tdesc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdesc/subscriptions","organizations_url":"https://api.github.com/users/tdesc/orgs","repos_url":"https://api.github.com/users/tdesc/repos","events_url":"https://api.github.com/users/tdesc/events{/privacy}","received_events_url":"https://api.github.com/users/tdesc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-11T11:36:29Z","updated_at":"2015-06-11T12:39:22Z","closed_at":null,"body":"Hello,\r\nPrevious version of Polymer 0.5.5 works with Meteor Blaze render just fine.\r\nNow, with version 1.0.x it works only on single-page-application.\r\nIf it has few routes ( I use iron:router ) to switch between pages, Polymer breaks.\r\nDemo application with 2 pages. \r\nPage 1 renders fine once.\r\nhttp://monosnap.com/image/Y5ImNd7AFpYYppaLOLs2Wtnv0EuNxV\r\nSwitching to Page 2 breaks DOM\r\nhttp://monosnap.com/image/PKgprIQACqv6jgeGfVV8WFC8jppFl2\r\nFrom log we can see, polymer element gets ready faster than Blaze renders template. \r\npaper-drawer-panel ready\r\npaper-drawer-panel attached\r\nTemplate.page2.rendered\r\nDemo project here: https://github.com/tdesc/PolymerTest.git\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Polymer/polymer/issues/comments/111118356","html_url":"https://github.com/Polymer/polymer/issues/1830#issuecomment-111118356","issue_url":"https://api.github.com/repos/Polymer/polymer/issues/1830","id":111118356,"user":{"login":"tdesc","id":1006137,"avatar_url":"https://avatars.githubusercontent.com/u/1006137?v=3","gravatar_id":"","url":"https://api.github.com/users/tdesc","html_url":"https://github.com/tdesc","followers_url":"https://api.github.com/users/tdesc/followers","following_url":"https://api.github.com/users/tdesc/following{/other_user}","gists_url":"https://api.github.com/users/tdesc/gists{/gist_id}","starred_url":"https://api.github.com/users/tdesc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdesc/subscriptions","organizations_url":"https://api.github.com/users/tdesc/orgs","repos_url":"https://api.github.com/users/tdesc/repos","events_url":"https://api.github.com/users/tdesc/events{/privacy}","received_events_url":"https://api.github.com/users/tdesc/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T12:39:21Z","updated_at":"2015-06-11T12:39:21Z","body":"First time page rendered, it calls logged as\r\nTemplate.name.rendered \r\npaper-drawer-panel created\r\npaper-drawer-panel ready\r\npaper-drawer-panel attached\r\n\r\nUsing Route.go() to switch page, we got wrong order:\r\npaper-drawer-panel created\r\npaper-drawer-panel ready\r\npaper-drawer-panel attached\r\nTemplate.name.rendered\r\n\r\nPolymer calls create/ready/attached in process of Blaze._materializeDOM and Template is not yet rendered, so <content> not found. And after paper-drawer-panel attached to DOM, Template content added on same level of DOM.\r\n\r\nBlaze.Polymer.created (paper-drawer-panel.html:374)\r\nPolymer.Base.addFeature.invokeBehavior (polymer-micro.html:283)\r\nPolymer.Base.addFeature.doBehavior (polymer-micro.html:278)\r\nPolymer.Base.createdCallback (polymer-micro.html:108)\r\nmaterializeTag (materializer.js:99)\r\nmaterializeDOMInner (materializer.js:54)\r\nBlaze._materializeDOM (materializer.js:33)\r\ndoMaterialize (view.js:343)\r\nTracker.nonreactive (tracker.js:560)\r\ndoRender (view.js:341)\r\n(anonymous function) (view.js:191)\r\nTemplate._withTemplateInstanceFunc (template.js:437)\r\n(anonymous function) (view.js:190)\r\nBlaze._withCurrentView (view.js:523)\r\nDynamicTemplate:materialize (view.js:189)\r\nTracker.Computation._compute (tracker.js:294)\r\nTracker.Computation._recompute (tracker.js:313)\r\nTracker._runFlush (tracker.js:452)\r\nonGlobalMessage (setimmediate.js:102)"}}