-1
.controller('Ctrlajax', ['$scope', 'version','$sce', '$resource', '$http',
function ($scope, version,$sce,$resource,$http) {
$scope.answer = 'Ожидание ответа от сервера.....';
require('ajax_module');
}])
ajax_module.js
define('ajax_module',['angular'],function($http){
var path = './././data/'
$http.get(path+'res.php').success(function(data){
debugger
$scope.answer = data;
});
})
错误:未捕获的类型错误:未定义的是不是一个函数 如何通过$范围,$ HTTP?