Also begann ich heute über angularJS zu lernen und ich habe auch einen Demo-Code erstellt. Irgendwie wurde der Code nicht ausgeführt. Ich kopiere diesen Code von irgendwo und ändere meinen Namen. nach dem Ausführen des HTML. der Code zeigt {{CU.name}}
kann einen guten Link oder einfachen Beispielcode auf Schritt für Schritt ziehen Daten mit eckigen Js und MVC geben?AngularJS mit MVC Controller Guide benötigt
<script>
var TestCtrl = function ($scope, $http) {
$scope.firstCall = function() {
$http({
url: "@Url.Action("RetriveRecordList", "recordController")",
dataType: 'json',
method: 'GET',
data: '',
headers: {
"Content-Type": "application/json"
}
}).success(function (response) {
debugger;
alert("haha")
$scope.DemoList = response;
})
.error(function (error) {
alert(error);
});
}
}
<div ng-controller="TestCtrl" ng-init="firstCall()">
<div class="table-responsive com-table">
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th width="5%">Customer ID</th>
<th width="15%">Customer Name</th>
<th width="15%">Email</th>
<th width="20%">Mobile No.</th>
<th width="25%">Address</th>
<th width="20%">Registration Date</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="CU in DemoList">
<td width="5%">{{CU.name}}</td>
<td width="15%">{{CU.name}}</td>
<td width="15%">{{CU.name}}</td>
<td width="20%">{{CU.name}}</td>
<td width="25%">{{CU.name}}</td>
<td width="20%">{{CU.name}}</td>
</tr>
</tbody>
</table>
<div class="collapse">
<div class="well">
</div>
</div>
</div>
</div>
so ein Muss ng-app zu definieren, ist? [Link] http://www.c-sharpcorner.com/UploadFile/cd7c2e/show-data-in-grid-format-using-angularjs-and-web-api/ Dieses Link-Beispiel hat auch keine ng-App –
ja eckige Anwendung muss Modul haben und es wird mit HTML referenziert ng-app-Direktive – kamprasad