Ionic hydrides are formed by alkali and alkaline earth metals which are all electropositive metals. The hydrides of these group has formula MH or MH2 in which the hydrogen is electronegative element and they attract the bond pair electron towards itself. So M exist as cations and H exist as anions that is H-. For ex
NaH
Na+ H-