хранить все годы в Array Angular

// auther is Renat Galyamov thanks Renvat
function generateArrayOfYears() {
  var max = new Date().getFullYear()
  var min = max - 9
  var years = []

  for (var i = max; i >= min; i--) {
    years.push(i)
  }
  return years
}

var years = generateArrayOfYears().toString();

document.getElementById('years').innerHTML = years;
Farwa Miraj