divshot / ele-web

Ele, the in-browser development environment for Web Components.
https://ele.io/
MIT License
42 stars 9 forks source link

Access to User Written Custom Elements #26

Closed kenrothmuller closed 9 years ago

kenrothmuller commented 9 years ago

While ele is great for getting your feet wet, when you want to develop something more complex that depends on previously written lower level user ele custom elements - there doesn't seem to be a way to reference/import them. Tried a bunch of paths for imports and nothing worked. Am I missing something or is this something that needs to be added, like:

SockMonster1 commented 9 years ago

You can have multiple custom elements within of the same HTML file, so try copying and pasting the less complex elements within of the file of the main element. E.g.

<polymer-element name="my-main-element">
...
<template repeat="[foo in bar]">
<my-less-complex-element>{{foo.foo}}</my-less-complex-element>
</template>
...
</polymer-element>

<polymer-element name="my-less-complex-element">
...
</polymer-element>
kenrothmuller commented 9 years ago

Thanks... I can see show this would be a stop-gap solution, but it lacks the "cleanness" of having each element tucked away it its own file/definition. For playing around this is definitely workable. Still hoping in a future version this could be a feature

mbleigh commented 9 years ago

Definitely in the cards for the future, don't worry.

SockMonster1 commented 9 years ago

Yeah there is that compromise though note that there is an expand and contract feature you can use to make things look that little bit neater. It's next to the line number on the left.

kenrothmuller commented 9 years ago

All good points, but can't wait for the REAL thing.