title: How to call function from div on load in angularjs
body: <p>I am trying to pull value in div element and once I get value I would like to call a function to get data. I am unable to call function inside div element 
  HERe is my Html</p>
  
  <p>stats.html</p>
  
  <pre><code>&lt;div class="ItemsList" data-ng-init="GetStatsData({{menu.result}})"&gt;
   {{myitems}}
  &lt;div&gt;
  </code></pre>
  
  <p>RootController.js</p>
  
  <pre><code>function GetStatsData(resultval) {
   homeService.getitemsData(resultval)
          .success(function (data, status, headers, config) {
                          $scope.myitems = data
                  });
  }
  </code></pre>
  
  <p>I am getting data when calling function directly but when I try to use div tag and invoke the function I cannot get this working, Its never calling that function. My main goal is to get value in myitems passing menu.result in function.</p>
  
  <p>I appreciate any help to get this resolved</p>