That such a community as you will see I am new to angularJs and I have a problem accessing the elements of an array.
here I have my controller
var app = angular.module("teApp")
.controller("NewPromotionDetailController", ['$window','$scope','$attrs','$http','$cookies', function($window, $scope, $attrs, $http, $cookies) {
var url = CQ.HTTP.noCaching(CQ.WCM.getDesign().getPath()+'/jcr:content/global.infinity.json');
var items = CQ.HTTP.eval(url);
$scope.sharedArray = items.compartirList;
console.log(items.compartirList);
}]);
and the part of the HTML is where it fails to try to access an element of the array.
<div ng-controller="NewPromotionDetailController">
<div ng-repeat="item in sharedArray">
<p>{{item}}</p>
<a href=""><img ng-src="{{item.iconoCompartir}}"/></a>
</div>
</div>
As if I access it as such only {{item}} does it well brings with it each element within the array but if I try to access a particular data within each element it does not bring me anything, that is {{item.foo}} I already assured that this data does exist in the arrangement.
In this way comes the variable items.compartirList which is what I have in the scope so there is no problem with it
[{"iconoCompartir":"/content/dam/tecom/iconos/icon-fb.png","tipoCompartir":"external","enlaceCompartir":"https://www.facebook.com/","noFollowCompartir":["true"]},
{"iconoCompartir":"/content/dam/tecom/iconos/icon-tw.png","tipoCompartir":"internal","enlaceCompartir":"https://twitter.com/login?lang=es","noFollowCompartir":[]}]