Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.37k stars 431 forks source link

Add import syntax to import shop-item.js #194

Closed kazu80 closed 6 years ago

kazu80 commented 6 years ago

Hey guys.

Not find import syntax for solve shop-item element on shop-products.js. The reason why it should be solved is because it imported by shop-cart.js.

I think shop-products.js need import syntax for solve shop-item element too.

Thank you

IadityaM commented 6 years ago

Was facing problems with the same when making custom views for my applciation. Was unable to find where the shop-item.js file or contents are being imported.

Found a workaround for custom-views though in shop-products.js (or customlist-element.js) file right above the class name is declared I could import the './shop-item'(or custom-item.js in my case) by simply using the "import './shop-item';" statement.

When the import statement was missing the custom-item wouldn't render and there was no error or warning in the console. though when i navigated to view3 and back to my custom view the data would populate.

Now with the import statement i can fetch custom data from a static source to populate my list element. Still figuring out how to fetch the data from a firebase database though.

Feel free to connect over any discussion on this.

notwaldorf commented 6 years ago

Thanks! Merged!