Ng-Repeat Issue

http://angularjs.org/

by Michael Hunziker

HTML

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.4.0.js"></script>
<div ng-controller="MyCtrl">
     <h2>First attempt</h2>

    <div>ngModel doesn't work at all because the values are not bound. Also, strings are immutable.</div>
    <br />item in <code>{{ itemsInObj | json }}</code>

    <ul>
        <li ng-repeat="item in objsInObj">{{item.title}}
            <a ng-click="testFunction(item)">Click</a>
        
        </li>
    </ul>
</div>

JavaScript

var myApp = angular.module('myApp', []);

function MyCtrl($scope) {
    $scope.objsInObj = [{
        "id": "51FB912FCD2F771DF6048ED7",
            "customerName": "fads",
            "title": "fads",
            "serviceComponents": [{
            "catalogRef": "S.GE.01"
        }],
            "serviceObjects": [{
            "objectType": "SLA",
                "name": null,
                "description": null,
                "parameters": [{
                "catalogRef": "AZP",
                    "value": null
            }, {
                "catalogRef": "S.GE.01.1",
                    "value": null
            }, {
                "catalogRef": "SZC",
                    "value": null
            }, {
                "catalogRef": "AZ1",
                    "value": null
            }]
        }]
    }];

    $scope.testFunction = function(item) {
        console.log(item);
        
    }
    
}