Hey, This might help you
*http://archugs.blogspot.in/2014/12/angularjs-ngDialog.html* On Monday, September 21, 2015 at 11:20:27 PM UTC+5:30, Vern Jensen wrote: > > I'm looking to implement custom dialogs in Angular 2, similar to what is > built into Angular 1, so I can port code there. > > I found a project online that does this using Angular 2 Alpha 26, but > attempting to get it to work in my environment was a nightmare so I have > abandoned that in favor of jQuery UI dialogs which are very easy and > provide all the functionality I need. > > I'm just trying to figure out how to wrap this inside of an Angular 2 > directive/class. Each dialog has its own custom HTML in the body, so I > figure wrapping this in an Angular 2 directive would be the way to go. Then > in the HTML I put: > > <mydialog myprop="foo"></mydialog> > > and then when I'm ready to use that from the code, I could call: > > var dialogA = new MyDialog(); > dialogA.show(); > > Problem is, <mydialog> in the HTML instantiates a *separate* instance of > mydialog than "new MyDialog()" does in the code when I want to actually > show it from some other place in the code. And, the dialog created via "new > MyDialog()" doesn't have access to any of the custom properties set on > <mydialog> such as myprop="foo". > > How do I access the instance of "mydialog" that was already created in > html via the <mydialog> directive, and call a method in its class? > > -Vern > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.