在主 html 站点上使用聚合物表达式 [英] Use polymer expression on main html site
本文介绍了在主 html 站点上使用聚合物表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
简短的问题:是否可以在普通的 html 站点上使用聚合物表达式?这样我就可以在某处写 {{ 1+ 1 }}
并且它会被评估为 2.
short question: Is it possible to use polymer expressions on a normal html site? So that I could write {{ 1+ 1 }}
somewhere and it would be evaluated to 2.
推荐答案
如果您的意思是不包括任何聚合物",那么简短的回答就是不".否则,这里是 使用聚合物元素之外的聚合物表达式的示例:
If you mean "without including anything of polymer", than the short answer would be "no". Otherwise here is an example for using a polymer expression outside of a polymer element:
<!doctype html>
<html>
<head>
<script src="/components/platform/platform.js"></script>
<link href="/components/polymer/polymer.html" rel="import">
</head>
<body unresolved>
<template is="auto-binding">
1 + 1 is {{1+1}}
</template>
</body>
</html>
这篇关于在主 html 站点上使用聚合物表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文