I am doing an project in which I should send data from the parent component to MatDialog Component ,I can do this
data:{ name:this.options[2].name, costs:this.options[2].cost, }
but I am using Ngfor the component so I need to send which one I am selecting and send only that data