AngularJS Posting with dynamically created elements
<p>I'm a bit new to AngularJS, and I need a bit of help posting data. I am creating a new input box on keypress of each input box. Well when my user clicks the add button I want to post data to the db via angularjs. My first input box successfully posts the data to the db, but the following input boxes do nothing on ng-click. </p>

<p><strong>Here's my HTML:</strong> </p>

<pre><code> &lt;div id="divAddRow" class="row" ng-app="GroupApp"&gt; 
    &lt;div class="col-lg-8" ng-controller="GroupCtrl"&gt;
          &lt;div id="row1" class="input-group input-group-lg addGroup w3-animate-bottom"&gt;
                    &lt;input class="form-control input-lg txtAddGroup" ng-model="group.GroupName" placeholder="Group Name..." /&gt;
                    &lt;span class="input-group-btn"&gt;
                      &lt;button id="btn" type="button" ng-click="AddGroup();"
                          class="btn btn-success btn-flat"&gt;&lt;i class="fa fa-plus"&gt;&lt;/i&gt;&lt;/button&gt;
                    &lt;/span&gt;
           &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p><strong>Here's where I create the controls dynamically using clone() of the first div:</strong></p>

<pre><code>$(document).on('keydown', '.txtAddGroup', (function (e) {
            //this function clones the parent group and if one below it does not exist, it adds it to the DOM
            var currentRowNum = $(this).parent().attr('id').replace(/row/, '');
            var nxtRowNum = parseInt(currentRowNum, 10) + 1;
            if ($('#row' + nxtRowNum).parent().length === 0) {
                $('div.addGroup:last').after($('&lt;br/&gt;').add($('div.addGroup:first').clone().prop('id', 'row' + nxtRowNum)));                   
                $('div.addGroup:last input').val('');
            }
        }));
</code></pre>

<p><strong>Here is my angularjs script:</strong></p>

<pre><code>var app = angular
       .module('GroupApp', [])
       .controller('GroupCtrl', function ($scope, AddGroup) {
           $scope.AddGroup = function()
           {
               AddGroup.AddGrouptoDB($scope.group);
           }

       }) .factory("AddGroup", ['$http', function ($http){
var fac = {};
fac.AddGrouptoDB = function(group)
{
    $http.post("/Group/AddGroup", group).success(function (response) {
        alert(response.status);
    })


}
return fac;
}])
</code></pre>

<p>How do I accomplish this? Let me know if I am not being clear enough. Thank you for any help!!</p>