title: AngularJs - how to check indexOf in a variable?
body: <p>I have this html code and if the "modalOptions.actionButtonText" contains "delete" then I need to display danger button instead of primary button</p>
  
  <p>Html Code:</p>
  
  <pre><code>&lt;button class="btn btn-primary" data-ng-click="modalOptions.ok();"&gt;{{modalOptions.actionButtonText}}&lt;/button&gt;
  </code></pre>
  
  <p>I know we can use "ng-if" to check the condition but is there any way I can use indexOf in angularjs or something else to achieve this?</p>