title: $mdDialog.confirm() with custom templateUrl
body: <p>I'm using $mdDialog in my application, but would like to use it as a "confirm" dialog instead of normal one. This means, the code flow should not proceed until user clicks on one of the two buttons in confirm dialog. I noticed that $mdDialog.confirm() can be used, but I'm not sure how to use it with custom templateUrl and a corresponding controller as the dialog's content.</p>
  
  <p>Following is what I have written which works fine as far as dialog is concerned, but the code flow doesn't stop after the dialog is opened. It should stop until Ok or Cancel is clicked by the user.</p>
  
  <pre><code>$mdDialog.show({
        controller: 'incomingCallDialogController',
        templateUrl: 'app/components/others/incomingCallDialog/incomingCallDialog.tpl.html',
        locals: {message: message},
        parent: angular.element(document.body)
     }).then(function (answer) {
        console.log("here");
     }
  </code></pre>