That is really too bad that you’ve got neighbors inconsiderate enough to let their aggressive dogs roam freely. More a reflection on them than the dogs.
I would say maybe both treats and spray. Sometimes just tossing a treat (past the dog so they have to go the other direction) would be enough I think, but god forbid you actually find yourself about to be bit I would carry some spray. And talk to the owners of the dogs if you can find out who they are, that is not ok!
"A journey of a thousand miles begins with a single step."