title: Best way to create custom modal dialog in angular2?
body: <p>I'm working in a team project where there is a component for modal dialog window, which is being placed everywhere that window is needed with <code>*ngIf</code>, a callback function passed to input, a message and some other stuff. I would like to create a directive, which would be placed on <code>&lt;button&gt;</code> or <code>&lt;a&gt;</code>, intercept the click event, show that modal dialog and if it's accepted then call the <code>(click)</code> handler of original element. What's the best way to do it? Atm I'm considering somehow removing that <code>(click)</code> handler by the directive and attaching that handler to it, inside of which I would programmatically create modal dialog with appropriate callback. Is my idea good or would you recommend something else?</p>