title: Angularjs - Invoke Function from module.config
body: <p>I have a code of</p>
  
  <pre><code>var viewerAngular = angular.module('ngAppDemo', ['restangular','btford.socket-io'])
  .config(function(RestangularProvider) {
  $.get('../config/config.xml',
          function(data) {
  
              $(data).find('contentserver').each(function() {
                  serverDetails.contentserver = assignServerDetails($(this));
                  var restprovider = RestangularProvider;
                  restprovider.setBaseUrl("http://"+serverDetails.contentserver.ip+":"+serverDetails.contentserver.port+"\:"+serverDetails.contentserver.port);
                  //$scope.init();
              });
  
      });
  </code></pre>
  
  <p>I need to invoke function <code>init()</code>, after reading the config(<code>../config/config.xml</code>) file. 
  I got an error of <code>ReferenceError: $scope is not defined</code>.</p>
  
  <p>How can I add <code>$scope</code> in <code>module.config</code>? Or How can I call function from config?</p>