Error: Property 'replaceAll' does not exist on type 'string' #2826
-
Any solution to this? |
Beta Was this translation helpful? Give feedback.
Answered by
Raulcarvalhomelo
Sep 29, 2022
Replies: 1 comment
-
You may solve the problem using RegExp and global flag. The global flag is what makes replace run on all occurrences. "1399/06/08".replace(///g, "_") // "1399_06_08" |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BeyersNel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may solve the problem using RegExp and global flag. The global flag is what makes replace run on all occurrences.
"1399/06/08".replace(///g, "_") // "1399_06_08"
https://www.thecodeteacher.com/question/80066/angular---Property-'replaceAll'-does-not-exist-on-type-'string'