We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML
<button class="button button-positive" modal-select="" ng-model="voucherService.AccountName" modal-title="Select a account" options="AccountList" has-search="true" search-properties="['AccountName']"> Select it <div class="option"> {{option.AccountName}} </div> </button>
Controller
$scope.AccountList = []; $scope.FillAccountList = function () { var query = "SELECT AccountID, AccountName FROM AccountMaster order by AccountName"; $cordovaSQLite.execute(db, query, []).then(function (res) { if (res.rows.length > 0) { for (var i = 0; i < res.rows.length; i++) { $scope.AccountList.push({ AccountID: res.rows.item(i).AccountID, AccountName: res.rows.item(i).AccountName }); } } else { console.log("No results found"); } }, function (err) { console.error("error=>" + err); }); }; $scope.FillAccountList();
The text was updated successfully, but these errors were encountered:
Hi, sorry but it's difficult to reproduce this for me. Does your example work if the data is coming from another source?
Sorry, something went wrong.
If data is predefined then it works. But when data are loaded in controller then it fails. You can try to push json data to a list and check.
No branches or pull requests
HTML
<button class="button button-positive" modal-select="" ng-model="voucherService.AccountName" modal-title="Select a account" options="AccountList" has-search="true" search-properties="['AccountName']"> Select it <div class="option"> {{option.AccountName}} </div> </button>
Controller
$scope.AccountList = [];
$scope.FillAccountList = function () {
var query = "SELECT AccountID, AccountName FROM AccountMaster order by AccountName";
$cordovaSQLite.execute(db, query, []).then(function (res) {
if (res.rows.length > 0) {
for (var i = 0; i < res.rows.length; i++) {
$scope.AccountList.push({
AccountID: res.rows.item(i).AccountID,
AccountName: res.rows.item(i).AccountName
});
}
} else {
console.log("No results found");
}
}, function (err) {
console.error("error=>" + err);
});
};
$scope.FillAccountList();
The text was updated successfully, but these errors were encountered: