if string contains substring javascript shorthand 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);