与 if 模板一起使用的纸张输入
paper-input used with an if template
我有一些内容想展示 if
用户检查 paper-checkbox
。
我以为我曾经(在 1.0 之前)能够按照
的方式做一些事情
<template is='auto-binding'>
<paper-checkbox checked="{{isChecked}}"></paper-checkbox>
<template if='{{isChecked}}'>
Conditional content
</template>
</template>
但这似乎不起作用。
自动绑定和条件模板有 changed in Polymer v1.0+。
- 自动绑定模板现在使用
is="dom-bind"
。
- 条件模板现在使用
is="dom-if"
以及 if
属性。
<template is="dom-bind">
<paper-checkbox checked="{{isChecked}}"></paper-checkbox>
<template is="dom-if" if="{{isChecked}}">
Conditional content
</template>
</template>
我有一些内容想展示 if
用户检查 paper-checkbox
。
我以为我曾经(在 1.0 之前)能够按照
的方式做一些事情<template is='auto-binding'>
<paper-checkbox checked="{{isChecked}}"></paper-checkbox>
<template if='{{isChecked}}'>
Conditional content
</template>
</template>
但这似乎不起作用。
自动绑定和条件模板有 changed in Polymer v1.0+。
- 自动绑定模板现在使用
is="dom-bind"
。 - 条件模板现在使用
is="dom-if"
以及if
属性。
<template is="dom-bind">
<paper-checkbox checked="{{isChecked}}"></paper-checkbox>
<template is="dom-if" if="{{isChecked}}">
Conditional content
</template>
</template>