When trying to utilize ng-bind-html alongside JavaScript's replace() function, everything works smoothly without using a global value in the replace(). However, as soon as I add something like replace(/test/g, 'TEST'), an error appears in the console:
Syntax Error: Token '/' not a primary expression at column 95
The code snippet that is causing the issue is as follows:
ng-bind-html="(resume.address == null || resume.address == '') ? 'Mailing Address' : resume.city.replace(/;/g, 'TEST')"
Is there an obvious mistake in my approach that I am missing? If so, what would be the correct way to structure this?
Edit:
My main objective is to substitute multiple ";" characters within a string with line break elements that AngularJS won't sanitize into a string literal. Any suggestions for a more effective method are also appreciated.