Angular UI 遮罩空占位符 [英] Angular UI mask empty placeholder

查看:23
本文介绍了Angular UI 遮罩空占位符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对日期字段使用 angular ui mask 指令,并为占位符添加下划线.有没有办法在占位符上不显示任何内容?

解决方案

请尝试一次.

<input class="form-control" type="text" ng-model="accountNumber" ui-mask="9999 9999 9999 9999 999" ui-mask-placeholder-char="space"/>

使用 ui-mask-placeholder-char="space" ,可以获得空的占位符.

I am using angular ui mask directive for a date field and its adding underscores for the placeholder. Is there a way to show nothing on the placeholder?

解决方案

Please try this once.

<div ng-app="myApp">
  <input class="form-control" type="text" ng-model="accountNumber" ui-mask="9999 9999 9999 9999 999"  ui-mask-placeholder-char="space" />
</div>

Using ui-mask-placeholder-char="space" , you can get empty placeholder.

这篇关于Angular UI 遮罩空占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆