user3871566 user3871566 - 1 year ago 117
AngularJS Question

Manipulate json object in angularjs ng-repeat

Curretntly I am working in Python and front side Angularjs. I am getting data in view with JSON object. Now I want to use that JSON object in my ng-repeat.Below is my code:-

is it possible to use like that??


<div ng-repeat="choice in {{result['products']}}" >
<input type="radio" name="choice" ng-model="" value="">


Answer Source

Yes, it's possible you don't need {{}}:

function Ctrl() {
    this.obj = {id: 'a', checked :true, result: {0:0,1:1,2:2}}


Try this:

<div ng:controller="Ctrl"> 
   <div ng:repeat="o in obj.result">

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download