I have the following Angular code:
<li ng-repeat="select in Items">
<foo ng-repeat="newin select.values">
ng-if="select.name == '?'"
String#includes method that checks whether a string contains another. This can be used if the target environment supports it. The method returns
true if the needle is found in haystack else returns
needle is the string that is to be searched in
You can use
String#indexOf to get the index of the needle in haystack.
The index can be compared with
-1 to check whether needle is found in haystack.
ng-if="haystack.indexOf(needle) > -1"