AngularJS: sync $location.search with an input value

By Anatoly Mironov