feat($location): allow prevent syncUrl on failure

Check defaultPrevented before syncUrl on failure.