No idea why I'm getting this error here, I've used this exact type of function in other apps before. The only difference here is that I'm including this inside of an Angular Controller, could that possibly have anything to do with this error?

// Controller for Add Customer
app.controller('AddCustomerController', function($scope) {
$scope.deactivate_btn = false;
// Check all users:
this.checkAll = function() {
var checkboxes = document.getElementsByName('checkboxCustomer');
var checkAll = document.getElementsByName('checkboxAll');
for (var i = 0, n = checkboxes.length; i < n; i++) {
checkboxes[i].checked = checkAll[0].checked;
}
};
function buildAddedSiteRow(id, name, address, loc1, loc2, city, state, zip) {
id = id || " ";
name = name || " ";
address = address || " ";
loc1 = loc1 || " ";
loc2 = loc2 || " ";
city = city || " ";
state = state || " ";
zip = zip || " ";
var number = 1 + Math.floor(Math.random() * 6);
return "<tr class='added_sites_tbody'><td><div class='check-label'><input ng-click='deactivate_btn = !deactivate_btn' ng-class='{ active: deactivate_btn }' type='checkbox' name='checkAddSite' id='"+id"' class='css-checkbox' /><label for='"+id"' class='css-label radGroup1 clr'>"+id"</label></div></td><td>"+name"</td><td>"+address"</td><td><div class='add_sites_location'><p>"+loc1"</p> <p>"+loc2"</p></div></td><td>"+city"</td><td>"+state"</td><td>"+zip"</td><td></td></tr>";
};
});