title: How to show modal popup if condition is true in angular 8?
body: <pre><code>&lt;div *ngIf="httpdata=='success' &amp;&amp; res==true ?fun():''"&gt;
  
  &lt;/div&gt;    
  
  fun() {
  //alert("hi")
  $(document).ready(function () {
    // Attach Button click event listener 
    $("#edit-submit").click(function () {
      // show Modal
      $('#myModal').modal('show');
    });
  });
  this.res = false;
  }
  </code></pre>
  
  <p>I have used the above code. Once the button is clicked, json data is posted through web api, after data is inserted, the response message will be 'success'. If the response is success, it should display message in modal pop
  that data is successfully sumbitted. 
  It is not displaying any popup and there are no errors.</p>