title: How can I call the JS function which is defined in subpage?
body: <p>In angularjs,I use the  directive to contains the subpage into mainpage.</p>
  
  <p>However, I found when I want to call the JS function in subpage, the browser always return back the information .
  I wonder what can I do to fixed the errors.</p>
  
  <p>Mainpage</p>
  
  <pre><code>var menuModule = angular.module('menuModule',[]);
  menuModule.controller("MenuSettingController", function($scope, $http) {
      initTree();
  });
  </code></pre>
  
  <p>Subpage</p>
  
  <p><code>&lt;script type="text/javascript"&gt;
      function initTree(){
          console.log("in");
      }
  &lt;/script&gt;</code></p>
  
  <p>Thanks a lot.</p>