title: Multiple functions in Angular config
body: <p>I'm working on my first Angular project and currently stuck (again).</p>
  
  <p>My problem is I have two functions that needs to implement in the Angular config. </p>
  
  <ul>
  <li>For Facebook connect (I use <a href="https://github.com/GoDisco/ngFacebook" rel="nofollow noreferrer">ngFacebook</a>)</li>
  <li>For routing ( I use <a href="https://github.com/angular-ui/ui-router" rel="nofollow noreferrer">ui-router</a>)</li>
  </ul>
  
  <p>What I cannot understand is, both of there modules using <code>&lt;angular module&gt;.config</code>, I don't know how to combine these two , because when I read the Angular docs it seems like <a href="https://docs.angularjs.org/api/ng/function/angular.module" rel="nofollow noreferrer">it gets a name, and a function</a>.  </p>
  
  <p>Following is my current code (and these two works individually)</p>
  
  <pre><code>var myApp = angular.module('myApp', ['ui.router'])
      .config(function($stateProvider, $urlRouterProvider){
          $urlRouterProvider.otherwise("/state1");
          $stateProvider
            .state('state1',{
              url: 'state1',
              templateUrl: "../pages/form.html"
            });
            $locationProvider.html5Mode(false);
      });
  
  
  
  myApp = angular.module('myApp', ['facebook'])
  
      .config([
          'FacebookProvider',
          function(FacebookProvider) {
              var myAppId = '&lt;FB app id&gt;';
              FacebookProvider.init(myAppId);}
  
      ]
  )
  </code></pre>
  
  <p>How can I combine these two functions in to one </p>
  
  <pre><code>var myApp = angular.module('myApp', ['facebook','ui.router']).config(
       facebook functon and ui-route function
   ) 
  </code></pre>
  
  <p>I have found almost the same <a href="https://stackoverflow.com/questions/24659505/multiple-config-blocks-in-angular-module">SO question here</a> but unfortunately no answer.</p>