googlecodelabs / polymer-first-elements

Get started creating custom elements with Polymer
https://codelabs.developers.google.com/codelabs/polymer-first-elements/
22 stars 54 forks source link

Nothing shows #6

Closed Cadam92 closed 8 years ago

Cadam92 commented 9 years ago

I've run the demo both through Chrome Dev Editor and through Polyserve but nothing shows up on chrome when I have it running.

Great summit show yesterday guys!

All the best

przmv commented 9 years ago

Seems it was fixed in #8 — but it hasn't been merged upstream yet.

robdodson commented 9 years ago

@Cadam92 Are you running preview from the index file or from the demo file? I believe you want to preview the demo.html.

The path fix mentioned in #8 is unfortunately incorrect (though if it's your first time using Polymer this is non-intuitive). This explains a bit more (https://www.polymer-project.org/1.0/docs/start/reusableelements.html#html-imports-and-dependency-management). All reusable elements should assume that they'll eventually end up as siblings in a bower_components directory, meaning you can't actually have a path that depends on bower_components when you're developing. We use a tool called polyserve to allow you to develop with the appropriate structure.

I've got a better explanation here: https://youtu.be/p7Q1mQtFGM8?t=20s I shot that video during Polymer 0.8 but the same information is true for 1.0

przmv commented 9 years ago

@robdodson Thank you for your explanations!

I'm not @Cadam92 but I also had the same issue with Chrome Dev Editor, but it works when I run polyserve from the command line.

arthurevans commented 8 years ago

Not sure if this is what you encountered, but the original demo had the main code in a subfolder: icon-toggle. If you don't follow the codelab carefully, and you opened the top-level folder as a project, nothing works right.

The repo has been restructured so you can git clone the repo directly into CDE, and the codelab is being rewritten to match. Hopefully this will help with the confusion.

arthurevans commented 8 years ago

I've restructured the repo and the codelab slightly to avoid some problems people were having with running the demo. As we haven't heard any more from @Cadam92, closing this issue.

If you are still having trouble with the updated codelab, please open a new issue and we'll track it down. Thanks!