Create a dialog service that you can then inject into any component to generate your dialog. That way the business logic has no idea about how a dialog works but is only interested in getting user input.
The code becomes clean and maintainable. If in future you want to replace the dialog with something else then you only have one place to make changes into.
code:
https://github.com/grepsoft/angular-g...
コメント