Kondal Kondal - 4 years ago 89
Javascript Question

Im new in AngularJs i'm trying to do one json file to read data can anyone please suggest to me

i want same as like but i don't know where a i use ng-repeat directive

<body ng-app="task">
<div ng-controller="AppCtrl" ng-cloak>
<md-content class="md-padding">
<div>
<md-card-title layout="row" layout-align="start">
<md-checkbox md-no-ink aria-label="" ng-model="data.cb5" class="md-default">
</md-checkbox>
<md-card-title-text layout="column">
<span class="md-headline">Maturi venkata subbarao engg college</span>
<span class="md-subhead">Nadergul,Hyderabad,Telangana 501510</span>
</md-card-title-text>
</md-card-title>
</div>
</md-content>
</div>



Answer Source

Add the ng-repeat as below,

<body ng-app="task">
    <div ng-controller="AppCtrl" ng-cloak>
     <md-content class="md-padding">
        <div ng-repeat="item in dataItems">
            <md-card-title layout="row" layout-align="start">
                <md-checkbox md-no-ink aria-label="" ng-model="item.cb5"   class="md-default">
                </md-checkbox>
                <md-card-title-text layout="column">
                    <span class="md-headline">{{item.Name}}</span>
                    <span class="md-subhead">{{item.location}}</span>
                </md-card-title-text>
            </md-card-title>
        </div>
    </md-content>
</div>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download