Polymer

  • Build an app with App Toolbox
    • Note: Normally when adding a new custom element for the first time, you'd want to add an HTML import to ensure the component definition has been loaded. However, this app template is already set up to lazy-load top level views on-demand based on the route, so in this case you don't need to add an import for your new<my-new-view> element.
  • Routing & Lazy Loading:
  _pageChanged(page) {
    // Load page import on demand. Show 404 page if fails
    var resolvedPageUrl = this.resolveUrl('my-' + page + '.html');
    Polymer.importHref(
        resolvedPageUrl,
        null,
        this._showPage404.bind(this),
        true);
  }

polymer-cli

  • polymer-init {} -
  • polymer serve --open - Local dev server, flag w/ open to open in default browser
  • polymer build - bundle (docs)
  • polymer.json - (docs)
    • You only need to add files you will lazy load or import using the asyncattribute to the fragmentslist. Any files that are imported using synchronous<link rel="import">tags should _not _be added to fragments.

webcomponents.org

<marked-element>

s-markdown

results matching ""

    No results matching ""