<dom-module id=‘proto-element‘>
<template>
<div>{{greeting}}</div>
</template>
</dom-module>
<script>
//元素注册
Polymer({
is:‘proto-element‘,
//给元素的原型加属性和方法
properties:{
//为元素的公开API声明属性
greeting:{
type:String,
value:‘sfp‘
}
}
})
</script>
//使用polymer的过程
注册和生命周期
属性声明
局部dom
事件
数据绑定
行为
公共函数
实现性特征和元素
polymer-developer guide-feature overview
原文:http://www.cnblogs.com/wang-jing/p/4655832.html