Ions conduct electricity in ionic compounds.In case of solids, ions are held together by strong electrostatic force of attraction, hence they are not able to move freely. Hence, ionic solids are not able to conduct electricity in solid state. But in molten state or in solution form, the ions are free to move and can conduct electricity.