feat($state): allow prevent syncUrl on failure

Check defaultPrevented before syncUrl on failure.
Merge pull request #967 from esion/sync_url_default_prevented

check defaultPrevented before sync url on failure