The thing to watch out for is the hackles along the shoulders and upper back. If it's teeth are bared and it's hackles are up it's Fu King time to kick it!
If it persists put the bike in between you and it, as a last resort hit it with your whole bike, crank it.
In 13 years of riding or 11 years if you take away the last 2 i've had quite a few dogs try and bite me. None have been succesful, a lot of dogs wonder up in a friendly way tail waging open mouthed. Had a pup the other day there the size of an average lab run up to me. It wasn't a threat and a lovely big dog.
But a lot of dogs are simply a pain and a lot of owners think it's funny and laugh when they have a go at you!
Best to be prepared and if it comes down to it, better it gets kicked or stomped if needs be, than you get munched!