JSON key value AngularJS

by ndw5015

HTML

<div ng-app='myApp'>
    <div ng-controller='PhoneListCtrl'>
         <h1>Phones</h1>

        <div ng-repeat="phone in phones">
             <h2>{{phone.name}}</h2>

            <table border="1px">
                <tr ng-repeat="(key,value) in phone">
                    <td>{{key}}</td>
                    <td>{{value}}</td>
                </tr>
            </table>
        </div>
    </div>
</div>

JavaScript

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


App.controller('PhoneListCtrl', function ($scope) {
    $scope.phones = [{
        "name": "Nexus S",
            "snippet": "Fast just got faster with Nexus S.",
            "age": 0
    }, {
        "name": "Motorola XOOM with Wi-Fi",
            "snippet": "The Next, Next Generation tablet.",
            "age": 1
    }, {
        "name": "MOTOROLA XOOM",
            "snippet": "The Next, Next Generation tablet.",
            "age": 2
    }];
});