-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