lib/angular/js/ng/anchorScroll.js
function getFirstAnchor(list) {
      var result = null;
      forEach(list, function(element) {
        if (!result && nodeName_(element) === 'a') result = element;
      });
      return result;
    }
function getFirstAnchor(list) {
      var result = null;
      forEach(list, function(element) {
        if (!result && nodeName_(element) === 'a') result = element;
      });
      return result;
    }
helper function to get first anchor from a NodeList can't use filter.filter, as it accepts only instances of Array and IE can't convert NodeList to an array using [].slice TODO(vojta): use filter if we change it to accept lists as well