AngularJS directive and service for syncing a model with the URL hash.