我正在使用angularjs材料芯片。我只想强迫用户只输入数字作为筹码输入。
代码:
<md-chips class="custom-chips" ng-model="obj.varcodeObjs" readonly="readonly"
md-transform-chip="newBarcode($chip)" md-removable="removable"
placeholder="Add Barcodes" input-aria-label="Barcodes">
<md-chip-template>
<span>
<strong> {{$chip}}</strong>
<!--[{{$index}}]-->
</span>
</md-chip-template>
<button md-chip-remove class="md-primary barcodechip" aria-label="Remove {{$chip}}">
<md-icon md-svg-icon="md-close"></md-icon>
</button>
</md-chips>