2017-04-02 99 views
0

创建聚合物元件

<!DOCTYPE html> 
 
<html> 
 
<head> 
 
<meta charset="utf-8"> 
 
<meta name="viewport" content="width=device-width"> 
 
\t <script src="bower_components/platform/platform.js"></script> 
 
\t <link rel="import" href="bower_components/polymer/polymer-mini.html"> 
 
</head> 
 
<body> 
 
<polymer-element name="x-foo" noscript> 
 
\t <template> 
 
\t \t Hello x-foo 
 
\t </template> 
 
</polymer-element> 
 
<x-foo></x-foo> 
 
</body> 
 
</html>

你好,大家好,我其实新的聚合物和我一直试图在其上运行我的第一个东西,但它不是提出来了,它有点沮丧,你知道的。 上面的代码在我的浏览器中没有显示任何内容,我不知道我在做什么错误,因为服务后我无法在浏览器中看到输出,而我正在使用谷歌浏览器。

回答

0

上面的代码是Polymer 0.x而不是Polymer 1.x。如果你想使用1.x版本,你应该看看聚合物自己的documentation对于与1.x相关的其他主题相同。