-1
我第一次尝试AngularJS和我卡在我的第一个get方法。AngularJS JSON GET从PHP文件
凡在jQuery的我会使用$阿贾克斯()我已经得到了下面,我得到一个错误
var theApp = angular.module('theApp', []);
theApp.controller('ContentController', ['$scope', function ($scope) {
}]);
theApp.controller('MenuSideController', ['$scope', function ($scope, $http) {
$http.get('/directory/assets/inc/category.php').success(function(data) {
$scope.list = data;
});
}]);
的错误,我得到
TypeError: Cannot call method 'get' of undefined