title: Returning a string value from a Typescript promise
body: <p>OK, here should be some simple Typescript code. In my mind anyway...</p>
  
  <pre><code>public showDialog(theNickname: string): string {          
          var req = {
              method: 'POST',
              url: '/Q/GetUserDetails',
              data: { nickname: theNickname }
          }
          this.$http(req).then((response) =&gt; {
  
              var c = "Nickname: " + response.data.Nickname + "&lt;br/&gt;";
              c = c + "Score: " + response.data.Score + "&lt;br/&gt;";
              c = c + "Followers: " + response.data.Followers + "&lt;br/&gt;";              
              return c;               
  
          });
  
      }   
  </code></pre>
  
  <p>Of course, it is not returning the string value as it is being returned as a promise. I don't want to use a timeout function. How can I return the string value? It is being called from an Angular function on the html. If I change</p>
  
  <pre><code>public showDialog(theNickname: string): string { 
  </code></pre>
  
  <p>to</p>
  
  <pre><code>public showDialog(theNickname: string): any { 
  </code></pre>
  
  <p>it still doesn't work. I am using this code in a UI.Bootstrap Popover.</p>
  
  <p>Thanks!</p>