2015-12-03 18 views

Trả lời

10

Có, bạn có thể, nhờ polygit.

Dưới đây là một ví dụ soạn sẵn, bạn có thể phân nhánh: https://jsfiddle.net/kaycebasques/2q3fqehz/

HTML:

<base href="https://polygit.org/components/"> 
<script src="webcomponentsjs/webcomponents-lite.min.js"></script> 
<link href="polymer/polymer.html" rel="import"> 

<dom-module id="x-example"> 
    <template> 
    <style> 
     :host { 
     display: block; 
     } 
    </style> 
    <h1>polyfiddle</h1> 
    </template> 
</dom-module> 

<x-example></x-example> 

JS:

// only need this when in the main document and on non-Chrome 
addEventListener('WebComponentsReady', function() { 
    Polymer({ 
    is: 'x-example' 
    }); 
}); 
+1

Sử dụng '' làm cơ sở để trỏ đến master! :) –

+0

jsfiddle không hoạt động đối với tôi. Tôi nhận được ERR_CONNECTION_REFUSED khi nó cố gắng để có được các tập tin – Gilberg

+0

@Gilberg nó làm việc bây giờ ... Tôi biết rằng các nhà bảo trì của [polygit] (https://github.com/PolymerLabs/polygit) đã làm việc trên cơ sở hạ tầng của nó trong đó có đã gây ra sự cố trong vài tuần qua và sẽ giải thích lý do bạn gặp lỗi đó. –

Các vấn đề liên quan