title: how to deal with between the view of php mvc and angularjs?
body: <p>I'm new study angularjs , now there is a problem I hava no idea, please hlep me. thank you !</p>
  
  <p>we use CodeIgniter NVC framework</p>
  
  <pre><code>//for example the controller is here
  $data['users'] = {something from databases};
  $this-&gt;load-&gt;view('home/index',$data);
  </code></pre>
  
  <p>now there is a view</p>
  
  <pre><code>//view
  &lt;div ng-controller="loadData"&gt;
       &lt;ul&gt;
          &lt;!--one :when I init this page I need to show php data--&gt;
          &lt;?php foreach(users as user):?&gt;
          &lt;li&gt;&lt;?=$user-&gt;name?&gt;:&lt;?=$user-&gt;email?&gt;&lt;li&gt;
          &lt;?php endforeach?&gt;
          &lt;!--two: but I must to update the users when others insert into users by ajax like
            the follow code --&gt;
          &lt;li ng-repeat="user in users"&gt;{{user.name}}:{{user.email}}&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>how can I deal with the "one" and "two" show in above codes???</p>