Make link between nodes in angular

Hi friends
I have a problem
I really need help
Please help me
I want to make a link between nodes in angular component when click on a button
Please explain to me how I can do it
Please make a sample for me

How is the button’s event handler supposed to know which two nodes to connect with a link? What should happen if there already is such a connecting link?

When the user deletes the link by the delete button on the keyboard computer it has to delete the link from my database by the link’s id in angular

I need to give the link id when the user creates the link
And I need to get the id link to delete it from my database when the user selects the link and then the user touch the delete button on the keyboard computer

I do not know how to give the link id when the user creates the link
And I do not know how to get the link id when the user deletes the link

I could solve the problem
Thank you so much bro
I give the link id as a label then It could delete the link from the database by the link id