I have the following code someone hard coded:
$scope.years = [
{id:curryear, name: curryear}
{id:curryear - 1, name: curryear - 1}
{id:curryear - 2, name: curryear -2}
];
My task is to populate it so that the HTML dropdown it is linked to can get every year within a certain range. I am pretty new to using angularjs so I am not sure about what I can do with it. Is there a way to iterate through the range, lets say 2020 to 2010 while populating it? Or can I make an array of sets in the JS function this resides in and set $scope.years equal to that>