i wish to insert a record in mysql table using angularjs. Table: Product product_id, name, description.
i wish to have two text fields and a save button and on the click of save button record should be inserted in mysql table. i referred to the following link :
but all in vain...
index.html
<html ng-app>
<head>
<script src="../angular-1.0.1.min.js"></script>
<script src="js/controllers.js"></script>
</head>
<body>
<ul ng:controller="ProductListCtrl">
<li ng:repeat="product in products">
{{product.name}}
</li>
</ul>
<form method = 'post'>
Name : <input type = 'text' name = 'txtName'/>
Description : <input type = 'text' name = 'txtDescription'/>
<button ng:click="saveProduct()">New Product</button>
<div id="content">
<ng:view></ng:view>
</div>
</form>
</body>
</html>
where do i write saveProduct() method and what should i write in it?
what should i do to add a record in mysql from angularjs?