How to solve the dog bite?

Previously, because of work, I raised it from the small customs and rarely brought out. Now I am more than 1 year old. When I go out, when I hold it, I will take a bite when I see someone walking over slowly? Is this premonition danger or habit? (No illness, not afraid of fighting)