Hey there!
The ionic compound is formed when the staticky attraction between the oppositional charges in the chemical company
E.g. the bond forms when the valency of your electrons of your atom is moved internally to your other atom
Good luck on your assignment and enjoy your day!
~LoveYourselfFirst:)