Replaced angular material dialog with a directive