如何在TypeScript中用-替换/?

时间:2018-09-26 20:56:53

标签: javascript angular typescript

我是Angular的新手,我想知道如何用给定的字符串将<->出现的“-”替换为“/"。

这是我的字符串示例:

  //this.cozinha.date is a string
  this.cozinha.date = this.route.snapshot.paramMap.get('date').replace('-','/')

0 个答案:

没有答案