Use  in dialog service instead of controller