Why is sodium chloride ionic?

Sodium chloride (NaCl) contains the anion chloride and cation sodium.