【发布时间】:2015-09-18 02:42:37
【问题描述】:
我需要像这个例子http://angular-ui.github.io/ui-utils/ 那样做电话掩码(999) 999-9999,但用于Ionic 移动应用程序输入。
ui-utils 在裸 AngularJS 应用程序中运行良好:http://plnkr.co/edit/NozbdhtRjaxq1KFYrwLo?p=preview
<body ng-controller="MainCtrl">
<input type="text" ng-model="phonenumber" ui-mask="(999) 999-9999">
</body>
但是,Ionic 也无法正常工作:http://codepen.io/hawkphil/pen/qdxOLW?editors=101
<input type="text" placeholder="First Name" ui-mask="(999) 999-9999" ng-model="attendee.firstname">
-
占位符被劫持了。如何修复占位符?
-
然后,当我输入一些数字时,一切都搞砸了,并在其中注入了一些占位符文本。如何解决?
-
另外,我不需要仅仅为了一件事而使用 ui-utils。 Ionic 是否有任何手机面罩替代品?
type=tel对我不起作用,因为它只会弹出数字键盘而不会弹出其他任何内容。
我确实需要显示占位符“输入电话号码”。所以显示 (___) ___ ____ 将不起作用
【问题讨论】:
标签: javascript angularjs ionic-framework angular-ui angularjs-ui-utils