If you keep on creating dialog boxes in your Angular app within components then watch this video where we create a generic dialog box that can be used for things like user confirmation, file save confirmation etc.
This way we create a service and let it handle the dialog box initiation and user interaction. Your component should have to worry about these things.