ng-click is not working on dynamic divs
<p>I am developing an app with angular and i need to insert some data from a webservice. I create the divs dynamically:</p>

<pre><code>for(var i = 0 ; i &lt; data.Output.length ; i++){   
          var listitem = document.createElement("div");
           listitem.setAttribute("ng-click","doMove()");
          listitem.className = "list-item";
          var name = document.createElement("span");
          name.className = "name"
          name.appendChild(document.createTextNode(data.Output[i].name));
          var link = document.createElement("a");
          link.appendChild(document.createTextNode('›'));


          listitem.appendChild(name);
          listitem.appendChild(link);
        wrapper.appendChild(listitem);
        }
</code></pre>

<p>The problem is that clicking on the div does not trigger that function.</p>

<p>UPDATE The data is from a http request.</p>

<p>UPDATE 2: the divs are put into: </p>

<pre><code>     &lt;div id = "wrapper"&gt;
---&gt;
     &lt;/div&gt;
</code></pre>

<p>I get the date in the cotroller like this:</p>

<pre><code>var request = $http({
        method: "post",
        url: url",
        data: data,

        headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' }
        });

        request.success(function (data) {

        });
</code></pre>