code: function () {
              if ($location.path() === "/") {
                  return pagesConfig["overview"];
              }
              var match;
              angular.forEach(pagesConfig, function (item) {
                  if (item.path === $location.path()) {
                      match = item;
                  }
              });
              return match;
          }
docs: Get the current section based on the path
  @returns {*}