How do I incorporate an existing javascript list of objects into angularjs so that I can then use it in the controller?
var list = [];
var rows = document.querySelectorAll("tr");
for (var i = 0; i < rows.length; i++) {
var obj = {
date: rows[i].childNodes[0].innerText,
action: rows[i].childNodes[1].innerText,
ao: rows[i].childNodes[2].innerText
};
list.push(obj);
}
var app = angular.module('myApp', []);
app.controller('myController', function($scope, $http) {
$scope.list = list;
});