有需要用Angular.js做post/get的朋友可以使用$http的方法做post/get的事情
不過記得controller要加入$http參數
app.controller('fixController', function($scope, $http){
$scope.search = function () {
$http({
method: 'POST',
url: './test.php',
data: 'one=1&two=2',
headers : {'Content-Type': 'application/x-www-form-urlencoded'}
}).success(function(res){
console.log(res);
}).error(function(){
console.log('error');
});
};
});