I defined a variable in the jsp page:
<script type="text/javascript">
var wpmagazine=[{"title":"11","content":"coco"},
{"title":"22","content":"nana"}];
</script>
Then I want to use angularJS to loop through the json array. What should I do?
<p class="zxzz-cont" ng-repeat="">
<p class="zx-img"><a href="#"><img src="img/new_img1.jpg" /></a></p>
<p class="zx-text">
<p class="zx-tit"><a href="#">title</a></p>
<p class="zx-zy">content</p>
</p>
</p>
Since you are using angualr, do not use this method to obtain data