title: Difference between onLoad and ng-init in angular
body: <p>I am learning angular. I don't understand what is difference between onLoad and ng-init for initialization of a variable. In which scope it creates this variable.</p>
  
  <p><code>For example</code></p>
  
  <pre><code>&lt;ng-include onLoad="selectedReq=reqSelected" src="'partials/abc.html'"&gt;&lt;/ng-include&gt;
  </code></pre>
  
  <p><code>OR</code></p>
  
  <pre><code>&lt;ng-include ng-init="selectedReq=reqSelected" src="partials/abc.html"&gt;&lt;/ng-include&gt;
  </code></pre>
  
  <p>Please also give me some idea about isolated scope.</p>