if a word is in a string javascript code example
Example: angular string contains
var string = "foo";
var substring = "oo";
console.log(string.indexOf(substring) !== -1);
var string = "foo";
var substring = "oo";
console.log(string.indexOf(substring) !== -1);