You can easily distinguish an ionic compound from a covalent compound by looking at the elements that form the compound.
An ionic compound is formed between a metal and non-metal. On the other hand, a covalent compound is formed between two non-metals. As you can see in your compound, you have nitrogen and hydrogen. which are both non-metals.