refactor(modaldialog): Reuse $dialog service in modal