我正在尝试更改Angular中NGXMASK中的默认提示器
我在 Angular 中使用 ngxmask 以以下模式显示电话号码:
(000) 000-0000
我设置showMaskTyped
属性设置为 true
以始终在输入中显示掩码模式,如下所示:
(___) ___-____
我想将 _
替换为自定义值 <代码># 这样它看起来如下:
(###) ###-####
这是代码:
<input mask="(000) 000-0000" [showMaskTyped]="true">
这是实时示例: https://jsdaddy.github.io/ngx-mask-page/mask-component#show-mask
将默认 _
替换为 < 的最佳方法是什么代码>#?
I am using ngxmask in Angular to display the phone number in the following pattern:
(000) 000-0000
I set showMaskTyped
Property to true
to always display the mask pattern in the input which looks as the following:
(___) ___-____
I want to replace the _
with custom value #
so that it looks like the following:
(###) ###-####
Here is the code:
<input mask="(000) 000-0000" [showMaskTyped]="true">
Here is the live example: https://jsdaddy.github.io/ngx-mask-page/mask-component#show-mask
What would be the best way to replace the default _
with #
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据文档,将允许您覆盖默认的
_
。就您而言,您将执行以下操作:
According to the documentation, placeHolderCharacter will allow you to override the default
_
.In your case, you will do the following: