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);
}
It returns the right names on the console:
Dinheiro
Cartão Visa Crédito
Cartão Master Crédito
How do I do ng-repeat and print in the View these results?
I'm doing this, but it's wrong, it does not print:
<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>