0
<script>
var app = angular.module("myapp",[]);
app.controller("usercontroller",function($scope,$http){
$scope.insertData = function(){
$http.post(
"insert.php",
{'yourName':$scope.yourName, 'lstName':$scope.lstName,
'passwrd':$scope.passwrd}).success(function(data){
alert(data);
});
}
});
我有這個代碼和控制檯返回一個錯誤,說「成功不是函數」我該如何解決它?使用角度和php連接到數據庫