Polymer index.html中脚本的最佳实践
在polymer中将脚本链接到index.html的最佳实践是什么。我的索引文件中有一个菜单,如果根据用户权限隐藏某些按钮,则使用dom。该权限检查使用ajaxiron ajax。我不确定如何将Polymer{}链接到索引,因为索引不是自定义元素Polymer index.html中脚本的最佳实践,polymer,Polymer,在polymer中将脚本链接到index.html的最佳实践是什么。我的索引文件中有一个菜单,如果根据用户权限隐藏某些按钮,则使用dom。该权限检查使用ajaxiron ajax。我不确定如何将Polymer{}链接到索引,因为索引不是自定义元素 <template is="dom-bind" id="app"> <template is="dom-if" if="{{myProp}}"> </template> </template>
<template is="dom-bind" id="app">
<template is="dom-if" if="{{myProp}}">
</template>
</template>
<script>
var app = document.querySelector('#app');
app.myProp = true;
</script>