title: After login success how to hide popup
body: <p>If login success, i want to close my popup automatically. What i wrote the code is shown in below. But this is not working. Can anyone please help.</p>
  
  <blockquote>
    <p>My html</p>
  </blockquote>
  
  <pre><code>    &lt;div class="modal fade" id="myModal"&gt;
  &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
        &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content" &gt;
          &lt;input id="login-username" type="text" class="form-control" name="username"&gt;
          &lt;input id="login-username" type="text" class="form-control" name="password"&gt;
          &lt;input type="button" id="btn-login" class="btn btn-success" (click)="funlogin()"&gt;Login  &lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <blockquote>
    <p>My ts</p>
  </blockquote>
  
  <pre><code>import * as $ from 'jquery';
  funlogin(){
  ///If(login==true){
  $("#myModal").dialog("close")
  }else{
  alert(login failed)
  }
  </code></pre>