title: How to return Promise<string> after user clicks "OK" button in a modal window?
body: <p>I want to show a modal window asking for input e.g: "Your new password:" by calling a function returning Promise after user clicks the "OK" button.</p>
  
  <p>Code that would be called after clicking a button to change password:</p>
  
  <pre><code>ChangePassword()
  {
   modal.PasswordModal().then(res =&gt; {/*set new password*/})
                        .catch(msg =&gt; {/*resolve error*/})
  }
  </code></pre>
  
  <p>Code that would return Promise and show the modal window with input.</p>
  
  <pre><code>PasswordModal() : Promise&lt;string&gt;
  {
   this.PasswordModalVisible = true
   //How to wait for the user to press the "OK" button?
  }
  </code></pre>