Polymer/vscode-plugin

The element xxx is not defined

Closed this issue · 2 comments

<link rel="import" href="../../bower_components/polymer/polymer.html"/>

<link rel="import" href="../tchat-login/tchat-login.html" />
<link rel="import" href="../tchat-home/tchat-home.html" />

<dom-module id="tchat-app">
  <template>
    <style>
      :host {
        display: block;
      }
    </style>

      <tchat-login id="login"></tchat-login>
      <tchat-home id="home" user="[[user]]"></tchat-home>
  </template>

  <script src="tchat-app.js"></script>
</dom-module>
class MyApplication extends Polymer.Element {
  static get is() {
    return 'tchat-app';
  }
}

window.customElements.define(MyApplication.is, MyApplication);

The vscode polymer-ide plugin tell me that <tchat-login id="login"></tchat-login> is not defined but when i ctrl click on <link rel="import" href="../tchat-login/tchat-login.html" /> it's going to the good file.

This looks like Polymer/polymer-analyzer#540

Will hopefully be fixed in the next release.

As a workaround try adding /** @polymerElement */ above the class

This should be fixed in v0.4.3