如何在angularjs材料芯片输入中仅使用数字?

时间:2019-02-17 04:26:57

标签: javascript angularjs angularjs-material

我正在使用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>

任何帮助将不胜感激! enter image description here

0 个答案:

没有答案