0

I'm trying to import the web component with id "test-comp" for the path "/path1":

<app-route path="/path1" import="test-component.html" template="test-comp"></app-route>

The code of the web component is the following:

<dom-module id="test-comp">
    <template>
        <div>Hello world</div>
    </template>
</dom-module>

<script>
        Polymer({
            is: 'test-comp',
            attached: function() {
               console.log("is attached");
            },
        });
</script>

However, it never enters the attached callback. Any ideas? Thanks a lot.

luthien
  • 1,285
  • 3
  • 15
  • 26

1 Answers1

0

SOLVED: It just needed to replace the template attribute with the id one.

luthien
  • 1,285
  • 3
  • 15
  • 26