title: How can I know whether AngularJs has synced data from model to view?
body: <p>I wrote some code like this:<br>
  html:</p>
  
  <pre><code>&lt;li class="js-page-item" ng-repeat="page in pageList"&gt;{{page}}&lt;/li&gt;
  </code></pre>
  
  <p>js:  </p>
  
  <pre><code>$scope.pageList= [1,2,3,4,5,6];  
  var items = $('.js-page-item');  
  console.log(items.length); // =&gt;0  
  </code></pre>
  
  <p>It turns out that when the second line in js code was executed the list hadn't been finished yet. The first thing in my head is using $timeout to defer until the list had been finished. But, I don't think that is a good idea.</p>
  
  <p>So, how can I know when the list has been finished?</p>