Data can be passed to the component that is loaded by the Dialog and also from the component back to the caller component. Use the open function and pass your parameters with the data property in the options object.
Similarly when hiding a Dialog, any parameter passed to the close function is received from the onClose callback defined by the open function at the caller.