title: How to extend/overwrite default options in Angular Material $mdDialog.show?
body: <p><strong>TL;DR</strong> : I need a way to overwrite default options provided my Angular Material (especially on Material Dialog) using providers (like any other angular modules - <a href="https://github.com/urish/angular-spinner#configuring-default-spinner-options" rel="noreferrer">a random example</a>).  </p>
  
  <p>I have been looking for a way to customize defaults <a href="https://material.angularjs.org/HEAD/api/service/$mdDialog#show" rel="noreferrer">options Angular Material Modal</a> but without any usable result.</p>
  
  <p>Like I have used on other plugins/modules this way could be achieved using a <code>provider</code>. Having a look in the core of the material (1.0.8) I was trying to set options using <code>setDefaults</code> method like this (let say I just want to disable backdrop for moment):</p>
  
  <pre><code>app.config(['$mdDialogProvider', function($mdDialogProvider){
      console.log($mdDialogProvider); 
      // ^ $get/addMethod/addPreset/setDefaults
  
      var defaults = {
          options: function(){
              return {
                  hasBackdrop: false
              }
          }
      }
      $mdDialogProvider.setDefaults(defaults);
  }]);
  </code></pre>
  
  <p>Right now when I am checking the options on <code>onComplete</code> callback :</p>
  
  <p><a href="https://i.stack.imgur.com/dwC6d.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dwC6d.png" alt="enter image description here"></a></p>
  
  <p>So as you can see the <code>hasBackdrop</code> option is updated, but the modal is not working anymore so I think I am missing something.</p>
  
  <p>Do you have any idea how the angular defaults could be extended in a proper way? </p>
  
  <p>Thanks</p>
  
  <p><strong>UPDATE</strong> : Options object without having <code>.setDefaults</code> active (de initial state) </p>
  
  <p><a href="https://i.stack.imgur.com/DL9cH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DL9cH.png" alt="enter image description here"></a></p>
  
  <p>Note : I have copied from their core <code>transformTemplate</code> and added in my defaults object, but the result is the same. I can see the DOM updated, console has no errors, but the modal is not visible.</p>