Мой выбор следующий
<div class="inputCol">
<label>{{'FrequentBeneficiary' | translate}}</label>
<select ng-model="params.beneficiary" ng-options="option.Name as option.Name for option in beneficiaryData"></select>
</div>
</div>
мой код вызова службы:
bcsSQLiteStorage.getDataDB(BeneficiariesKey).then(function (data) {
if (data.rows.length > 0) {
console.log("entrou no data.rows.length");
$scope.beneficiariesData = angular.fromJson(data.rows.item(0).value);
$scope.AccountLoaded = true;
MobileLoading.Ionic.hide();
console.log("Beneficiaries Data " + JSON.stringify($scope.beneficiariesData));
$scope.params.beneficiary = $scope.beneficiariesData[0].Name;
console.log($scope.params.beneficiary);
}
и мой console.log печатает имя просто отлично
console.log($scope.params.beneficiary);
prints the name correctly, does not print undefined
но мой выбор показывает неопределенный, когда я тестирую его, почему?что-то не так с моим выбором?