Modified version of the existing Angular Dialog Service