I want to create dynamic scope variables. Here is a sample for loop that I created
for(var i=0; i<array.length; i++){
$scope.'linkName'+i = 'Some value';
// it should be like $scope.linkName1, $scope.linkName2, etc.
}
The problem is that it doesn't allow for me to create it this way. Do you know the best way that I can use a for loop to loop through an array of variable names and assign that value to the scope variable?