-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?