` .then(function(data) {
.then(function(data) {
var dat = data.data;
$scope.tickets = [];
$scope.verificarCheckbox = function() {
if ($scope.checkstate) {
for (var i = 0; i < dat.length; i++) {
dat[i]
var ticket = {
numero : dat[i].numero,
rut : dat[i].rut,
servicio_id : LoginData.getData().id_servicio.split(",")[0]
};
};
$scope.tickets.push(ticket);
}
}
} else {
for (var i = 0; i < dat.length; i++) {
dat[i]
var ticket = {
numero : dat[i].numero,
rut : dat[i].rut,
servicio_id : LoginData.getData().id_servicio.split(",")[1]
};
};
$scope.tickets.push(ticket);
}
}
}
});
} }
});`