Added a modalDialog service so that the modal dialogs like confirm, prompt can be mocked in unit tests