<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);
});
}
});
I have this code and console returns an error that says "success is not function"how do I fix it?