Alkyl Halides are not ionic compound but Polar molecules
due to the electronegativity of oxygen is higher than the carbon atom .
We can say that it is a covalent with ionic character , but
it is not a totally ionic compound i.e. it can undergo chemical reactions that ionic compound does .
Yes alkyl halide can react with ammonia .
This is a Nucleophilic substitution .The Halogen atom will be substitute by nucelophile in this reaction .
Other nucleophile like water , cyanide ion , hydroxide ion ,
which has lone pair electrons can react with alkyl halides .
The product formed depends on the nucleophile.
eg. alkyl halides react with ammonia to give you Amine.
Unfortunately , certain condition must be fulfilled before the nucleophilic substitution takes place .
temp : REFLUX
reagent : the alkyl halides must be in the alcohol