[英]angular material chips field to make a chip from remaining entered text
I am using angular material md-chips
field. 我正在使用角材料
md-chips
字段。 The chips are currently formed only after I hit one of the the md-seperator-keys
. 目前只有在我按下
md-seperator-keys
之一时才形成筹码。
But when the focus is out of the chips filed, the remaining entered text must automatically form a chip. 但是,当焦点不在提交的筹码中时,其余输入的文本必须自动形成筹码。 How to achieve this?
如何实现呢?
<md-chips monitor-input-focus ng-model="formData[fieldDef.identifier]"
md-separator-keys="chipKeys"
name="inputField"
style="margin-bottom:8px;">
<md-chip-template>
{{$chip}}
</md-chip-template>
</md-chips>
Try the md-chips
attribute and the md-add-on-blur
for creating this behaviour. 尝试使用
md-chips
属性和md-add-on-blur
创建此行为。
See here: https://material.angularjs.org/latest/demo/chips 看到这里: https : //material.angularjs.org/latest/demo/chips
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.