docs: function bindModelToSearchParam($scope, $location, modelName, paramName, initialValue, to, from) {
          if (!(modelName in $scope)) {
              $scope[modelName] = initialValue;
          }
          var toConverter = to || Core.doNothing;
          var fromConverter = from || Core.doNothing;
          function currentValue() {
              return fromConverter($location.search()[paramName] || initialValue);
          }
          var value = currentValue();
          Core.pathSet($scope, modelName, value);
          $scope.$watch(modelName, function (newValue, oldValue) {
              if (newValue !== oldValue) {
                  if (newValue !== undefined && newValue !== null) {
                      $location.search(paramName, toConverter(newValue));
                  }
                  else {
                      $location.search(paramName, '');
                  }
              }
          });
      }