title: Polymer Dart Custom Element not executing
body: <p>It appears that my Polymer Dart custom elements that were once working now stopped firing.  Dartium displays in localhost the h1 tag but not my custom elements.  </p>
  
  <p>The only Dart Editor error/warning I get is:</p>
  
  <pre><code>"(from html5lib) Unexpected start tag (link). Expected DOCTYPE. See http://goo.gl/5HPeuP#polymer_40 for details."  
  </code></pre>
  
  <p>This warning message appears on every</p>
  
  <pre><code> &lt;link rel="import" href="packages/polymer/polymer.html"&gt;
  </code></pre>
  
  <p>but as best I can see this is a known issue which should not impede application execution.</p>
  
  <p>My troubleshooting efforts to date include:
  - Running pub cache repair from command line
  - Manually deleting package cache directory and running pub get again.
  - Downloading and running polymer-and-dart-codelab-master.zip (I get the same behavior)</p>
  
  <p>How can I diagnose this issue?</p>
  
  <p><strong>Pubspec.yaml contents:</strong></p>
  
  <pre><code>name: mpower
  description: Sample app built with the polymer.dart package
  environment:
    sdk: '&gt;=1.2.0 &lt;2.0.0'
  dependencies:
    polymer: '&gt;=0.15.1 &lt;0.16.0'
  dev_dependencies:
    unittest: '&gt;=0.10.0 &lt;0.11.0'
  transformers:
  - polymer:
      entry_points:
      - web/index.html
  </code></pre>
  
  <p><strong>Index.html Contents:</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;Mosaic mPower&lt;/title&gt;
      &lt;link rel="import" href="est_list.html"&gt;
      &lt;link rel="stylesheet" href="app.css"&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;h1&gt;Mosaic mPower&lt;/h1&gt;
      &lt;est-list&gt;&lt;/est-list&gt;
      &lt;script type="application/dart"&gt;export 'package:polymer/init.dart';&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>est-list.html</strong></p>
  
  <pre><code>&lt;link rel="import" href="packages/polymer/polymer.html"&gt;
  &lt;link rel="import" href="est_form.html"&gt;
  &lt;link rel="import" href="est_element.html"&gt;
  
  &lt;polymer-element name="est-list"&gt;
    &lt;template&gt;
      &lt;style&gt;
       select {
         margin-bottom: 30px;
         display: inline;
         padding: 6px 12px;
         font-size: 14px;
         line-height: 1.42857143;
         color: #555;
         background-color: #fff;
         background-image: none;
         border: 1px solid #ccc;
         border-radius: 2px;
         -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
         box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
         -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
         transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
       }
     &lt;/style&gt;
     &lt;div&gt;
       &lt;label&gt;Filter: &lt;/label&gt;
       &lt;select value="{{filterValue}}" on-change="{{filter}}"&gt;
         &lt;option template repeat="{{filter in filters}}"&gt;
           {{filter}}
         &lt;/option&gt;
       &lt;/select&gt;
     &lt;/div&gt;
     &lt;div on-estvalidated="{{addEst}}"
          on-formnotneeded="{{resetForm}}"&gt;
       &lt;est-form est="{{newEst}}"&gt;&lt;/est-form&gt;
     &lt;/div&gt;
     &lt;div on-deleteest="{{deleteEst}}"
          on-levelchanged="{{filter}}"&gt;
       &lt;template repeat="{{est in filteredEsts}}"&gt;
         &lt;est-element est="{{est}}"&gt;&lt;/est-element&gt;
       &lt;/template&gt;
     &lt;/div&gt;
   &lt;/template&gt;
   &lt;script type="application/dart" src="est_list.dart"&gt;&lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>est-list.dart</strong></p>
  
  <pre><code>import 'package:polymer/polymer.dart';
  import 'model.dart' show Est;
  import 'dart:html' show Event, Node;
  
  /*
   * Class to represent a collectionon-est of Est objects.
   */
  @CustomTag('est-list')
  class EstList extends PolymerElement {
    static const ALL = "all";
    /*
     * Field for a new Est object.
     */
    @observable Est newEst = new Est();
  
    /*
     * Collection of ests. The source of truth for all ests in this app.
     */
    @observable List&lt;Est&gt; ests = toObservable([]);
  
    /*
     * Sets the new est form to default to the intermediate level.
     */
    String get defaultCustomer =&gt; Est.CUSTOMERS[0];
  
    /*
     * List of filter values. Includes the levels defined in the model, as well
     * as a filter to return all ests.
     */
    final List&lt;String&gt; filters = [ALL]..addAll(Est.CUSTOMERS);
  
    /*
     * String that stores the value used to filter ests.
     */
    @observable String filterValue = ALL;
  
    /*
     * The list of filtered ests.
     */
    @observable List&lt;Est&gt; filteredEsts = toObservable([]);
  
    /*
     * Named constructor. Sets initial value of filtered ests and sets
     * the new est's customer to the default.
     */
    EstList.created() : super.created() {
      filteredEsts = ests;
      newEst.customer = defaultCustomer;
    }
  
    /*
     * Replaces the existing new Est, causing the new est form to reset.
     */
    resetForm() {
      newEst = new Est();
      newEst.customer = defaultCustomer;
    }
  
    /*
     * Adds a est to the ests list and resets the new est form. This
     * triggers estsChanged().
     */
    addEst(Event e, var detail, Node sender) {
      e.preventDefault();
      ests.add(detail['est']);
      resetForm();
    }
  
    /*
     * Removes a est from the ests list. This triggers estsChanged().
     */
    deleteEst(Event e, var detail, Node sender) {
      var est = detail['est'];
      ests.remove(est);
    }
  
    /*
     * Calculates the ests to display when using a filter.
     */
    filter() {
      if (filterValue == ALL) {
        filteredEsts = ests;
        return;
      }
      filteredEsts = ests.where((est) {
        return est.customer == filterValue;
      }).toList();
    }
  
    /*
     * Refreshes the filtered ests list every time the ests list changes.
     */
    estsChanged() {
      filter();
    }
  }
  </code></pre>