【发布时间】:2016-11-03 09:59:49
【问题描述】:
我是新的 AngularJs,如何使用 Visual Stduio 2013 调试 angularjs 中的代码,我在 Angular 中调用 RestAPI 但数据不显示,请帮助我。请检查下面的代码和图片。
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://localhost:9000/employees").then(function (response) {
$scope.myData = response.data;
});
});
<!-- language: lang-html -->
<div ng-app="myApp" ng-controller="customersCtrl">
<pre>{{myData | json}}</pre>
<p>Today's welcome message is:</p>
<ul>
<!--<li ng-repeat="x in myData">
{{ x.name + ', ' + x.Fname }}
</li>-->
</ul>
</div>
【问题讨论】:
标签: javascript angularjs visual-studio