0
I have this routine:
$scope.array1 = window.localStorage.getItem("tipos_pagamentos");
var as_formas_pag = $scope.array1.split(';');
for (var i = 0; i < as_formas_pag.length; i++){
$scope.array2 = as_formas_pag[i];
console.log($scope.array2);
}
That returns me on the console the right names:
Dinheiro
Cartão Visa Crédito
Cartão Master Crédito
How do I ng-repeat and print in the View these results?
I’m doing it this way, but it’s wrong, don’t print it:
<ion-list ng-repeat="r in array2 track by $index">
<ion-radio ng-model="checkItems[r.i]" ng-value="'{{r.i}}'">{{r.i}}</ion-radio>
</ion-list>
<button class="button button-full button-assertive" ng-click="pegaFormaPagamento(checkItems[r.i])" >
CONTINUAR
</button>
Was any of the answer helpful? Don’t forget to choose one and mark it so it can be used if someone has a similar question!
– Sorack