Angular 9中的NGX面具问题

发布于 2025-01-30 12:16:18 字数 212 浏览 6 评论 0原文

我通过为其分配一个变量,在我的应用中动态使用了NGX蒙版。

这是可确定的变量,当变量为null或未定义时,输入显示未定义。

这是在我将角度从VER-8升级到VER-9之后发生的。

它在Angular 8上正常工作。

当变量为空或未定义时,我希望输入中的蒙版无能为力。请帮我。

I have used ngx-mask dynamically in my app by assigning a variable to it.

This is nullable variable and input shows undefined when the variable is null or undefined.

This is happening after I upgrade Angular from ver-8 to ver-9.

It was working fine on Angular 8.

I want mask in input does nothing when the variable is null or undefined. Please help me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

裂开嘴轻声笑有多痛 2025-02-06 12:16:18

我找到了解决方案。

问题是我使用的是值,而不是NGMODEL来应用输入值。

当我将其更改为NGMODEL时,问题就解决了。

I find the solution.

The problem was I was using value instead of ngModel to apply value on input.

When I changed it to ngModel, the issue resolved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文