hi
im trying to create a function that when a button is clicked it will pass all my records to my json page which will save my data
this is what i have so far
var t = this;
t.RecordsSave = function ($http) {
for (var i = 0; i <t.records.length; i++) {
var record=t.recordss[i];
var data = params( {
record: record.Number[i],
record: record.ID[i],
record.Code[i]
});
$http({
method: 'POST',
url: RECORDS,//this json page
data: data,
});
}
};
i get the following error "params is not defined"
and "Cannot read property '0' of undefined"
how should i go about this. not familiar with angular js