Problem: I would like to be able to replace & amp; with & by using ng-show.
So I have a angular expression "e.Example" that contains the following strings {Camp & Stuff, Stuff $ Camp}. When I generate the string in my form, it represents "&" as "& amp;" and so forth.
I would like to be do something like:
<span ng-show="e.Example ==='$' replace it with someting else"></span>
How can I achieve that using ng-show? I know in C# I can use .Contains and .Replace. I was wondering if their is something similar in angularjs
@Lansana
I tried the following:
<span ng-show="e.Specialty === '&' && doSomethingTo(e.Specialty)"></span>
However, when I look at debugger, it shows the & char and not '& amp;' which the '&' appears when I click sumbit and display results
Update: Tried the following:
<span ng-show="doSomethingTo()"></span>
function doSomethingTo(val){
val.property = '&';
return true;
}