title: insert a record to mysql database using angularjs
body: <p>i wish to insert a record in mysql table using angularjs.
  Table: Product
  product_id, name, description.</p>
  
  <p>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 : </p>
  
  <p>but all in vain...</p>
  
  <p>index.html</p>
  
  <pre><code>    &lt;html ng-app&gt;
      &lt;head&gt;
          &lt;script src="../angular-1.0.1.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/controllers.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;ul ng:controller="ProductListCtrl"&gt;
          &lt;li ng:repeat="product in products"&gt;
              {{product.name}}
          &lt;/li&gt;
      &lt;/ul&gt;
      &lt;form method = 'post'&gt;
          Name : &lt;input type = 'text' name = 'txtName'/&gt;
          Description : &lt;input type = 'text' name = 'txtDescription'/&gt;
          &lt;button ng:click="saveProduct()"&gt;New Product&lt;/button&gt;
          &lt;div id="content"&gt;
              &lt;ng:view&gt;&lt;/ng:view&gt;
          &lt;/div&gt;
      &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>where do i write saveProduct() method and what should i write in it?</p>
  
  <p>what should i do to add a record in mysql from angularjs?</p>