I have something like this:
$http.post("action/delete.php", gid).success(function(response){ console.log(response.data); });
and I want to hide the .php page extension. Can anyone help!!
This shouldn't be an issue for angular. You can use $http
to post to action/delete
without a problem, provided that route exists on your server. What you need to do is look into configuring your back end server to understand that action/delete
should point to action/delete.php
. This shouldn't really be a tough thing to do, you'll just need to do some research on your web server settings.
I would suggest learning how to use a REST client (like this one), as well, so that you can test your routes independently of your front end and make sure they work.