UNPKG

lazy-import

Version:

An element based on polymer v2 to lazy import other elements.

30 lines (27 loc) 884 B
<link rel="import" href="../bower_components/polymer/polymer-element.html"> <dom-module id="lazy-component"> <template> <style> </style> <h2>Hello, I'm a lazy component with a property:[[prop1]]!</h2> </template> <script> (function(){ 'use strict'; class LazyComponent extends Polymer.Element { static get is() { return 'lazy-component'; } static get properties() { return { prop1: { type: String, value: 'Hello World' } }; } } window.customElements.define(LazyComponent.is, LazyComponent); })(); </script> </dom-module>