function getCashAdvanceSelectors(selected) {
datacontext.getCashAdvanceChoices()
.then(function (data) {
var arr = [];
data.forEach(function (entry) {
var ok = false;
if (selected != null && selected.indexOf(',') > -1) {
selected.split(',').forEach(function (item) {
if (entry == item) {
ok = true;
}
});
} else if (selected != null) {
if (entry == selected) {
ok = true;
}
}
var obj = {
name: entry,
selected: ok
};
arr.push(obj)
});
vm.CAItems = arr;
});
}
Wednesday, December 10, 2014
Tuesday, December 9, 2014
Check Box Data POST AngularJS
function getCashAdvanceSelectors() {
datacontext.getCashAdvanceChoices()
.then(function (data) {
//vm.CAItems = data;
var arr = [];
data.forEach(function (entry) {
var obj = {
name: entry,
selected: false
};
arr.push(obj)
});
vm.CAItems = arr;
});
}
datacontext.getCashAdvanceChoices()
.then(function (data) {
//vm.CAItems = data;
var arr = [];
data.forEach(function (entry) {
var obj = {
name: entry,
selected: false
};
arr.push(obj)
});
vm.CAItems = arr;
});
}
Subscribe to:
Posts (Atom)