角度6:逗号分隔的十进制管道不起作用

时间:2018-10-17 14:25:38

标签: angular angular6

我尝试过

ActivityNewModule

{{111234 | number:'':'en-gb'}}

都显示为{{111234 | number:'':'en-in'}}

我希望它看起来像111,234

我应该做出什么改变?

1 个答案:

答案 0 :(得分:1)

按照评论中的建议设置project's locale。这是首选方式。

另一种方法是使用本机function select(element){ $(element).prop('disabled', true); $.ajax({ url'url', success:function(response){ $(element).prop('disabled', false); } }); } 函数。

组件

.toLocaleString()

HTML

export class AppComponent implements OnInit {
    wind;

    ngOnInit() {
      this.wind = window;
    }
}

尚未测试,但可以正常工作

相关问题