docs: function stringToHash(hashAsString) {
          var entries = {};
          if (hashAsString) {
              var text = decodeURI(hashAsString);
              var items = text.split('&');
              angular.forEach(items, function (item) {
                  var kv = item.split('=');
                  var key = kv[0];
                  var value = kv[1] || key;
                  entries[key] = value;
              });
          }
          return entries;
      }