I am trying to use vanilla web components in aurelia. The html import is proving to be a bit odd.
I have installed and activated the template plugin
Installed the component via jspm and try to require it in the view template
The error message I get states that there is no template tag:
ERROR [app-router] Error: (SystemJS) There was no template element found in
The component does not have a template because it does not use one.
Code can be seen here:
I would like to use the required element in the template so that I don’t have to worry about versioning in the import.
What is required to import and use this component?
As stated in official doc, i think your usage of the element is incorrect. http://aurelia.io/docs/integration/polymer#setup
If you wish to use html import, put url in a links element and place before the template element
If this was a polimer component I would agree with you, but it’s not…
aurelia-html-import-template-loader as I understand it is suppose to assist in the link usage.
require.from should support by some way or another importing web components (not polimer web components, just standard based components)
You don’t want to manage the links manually because if you install it via jspm you need to manually update the links everytime you get a new version because the path includes the version number and this opens opportunity for bugs.
If these things are not taken seriously then it forces people to have to deploy via bower so that you don’t need to deal with the versioning issue.
so this works
<bmc-chart padding="30, 30, 50, 70" data.bind="data">
<linear-axis field="value" axis="y"></linear-axis>
To make this work I just added a empty template tag in the web components.
It’s not ideal to have redundant template tags, but it’s not a big deal either.