how to use md-dialog code as a service or factory in angularjs

71 Views Asked by At

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 });

App.factory('demo.controller',function(){

});
<md-dialog>
 //some code
  </md-dialog>

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.:)

0

There are 0 best solutions below