1
聚合物noob在這裏。在聚合物顯影劑的指南,我已經看到具有以下結構元件定義的一個示例:正確的聚合物元素定義結構
結構1(樣式模板的子層):
<dom-module>
<template>
<style>
...
</style>
</template>
<script>
...
</script>
<dom-module>
在聚合物入門工具包,我看到產生如下:
結構2(樣式模板的兄弟姐妹):
<dom-module>
<style>
...
</style>
<template>
</template>
<script>
...
</script>
</dom-module>
哪個是更好的以上正確的結構?還是每個人都服務於不同的目的?
TIA