title: how to use md-dialog code as a service or factory in angularjs
body: <p>my question is i have used md-dialog in most of the pages in our project.so thats why i decided to move all that md-dialog code to service.
  mine FACTORY, HTML,  code
  inside this factory i used $mdDialog.show({ //some code });
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>App.factory('demo.controller',function(){
  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;md-dialog&gt;
   //some code
    &lt;/md-dialog&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>and i don't know what to pass from the controller but i want to pass two parameters from the controller. Example:(opr,ev) so how to setup all these things any one help me.if possible send me the code.:)</p>