title: How to use AngularJS's module config with Scala.js?
body: <p>In plain JavaScript you can do:</p>
  
  <pre><code>angular.module('mymodule', ['ionic'])
    .config(function($someParam1, $someParam2) {
      // do something with the parameters
  }
  </code></pre>
  
  <p>I am trying to do this with Scala.js. I tried the following three attempts, all of which failed:</p>
  
  <p><strong>Attempt 1:</strong> Use <a href="https://github.com/greencatsoft/scalajs-angular">scalajs-angular</a></p>
  
  <pre><code>Angular.module("mymodule", Seq("ionic")).config(MyConf)
  </code></pre>
  
  <p>Problem: <code>MyConf</code> must extend <code>Config</code> and I did not find any location where I could pass in parameters.</p>
  
  <p><strong>Attempt 2:</strong> Use <a href="https://github.com/jokade/scalajs-angulate">scalajs-angulate</a></p>
  
  <pre><code>Angular.module("mymodule", Seq("ionic")).config((a: Any, b: Any) =&gt; {...})
  </code></pre>
  
  <p>This <em>should</em> work, but I get a compiler error: <code>not found: value js</code></p>
  
  <p><strong>Attempt 3:</strong> Use the dynamically typed API</p>
  
  <pre><code>global.angular.module("mymodule", Seq("ionic")).config((a: Any, b: Any) =&gt; {...})
  </code></pre>
  
  <p>Compiles, but the content inside the {} does not get called.</p>
  
  <p>The only way I can think of now is writing a javascript based "Bridge" which does something like:</p>
  
  <pre><code>angular.module('mymodule', ['ionic']).config(function($a, $b) {
      com.example.myapp.MymoduleConfigurator.config($a, $b);
  }
  </code></pre>
  
  <p>where <code>com.example.myapp.MymoduleConfigurator</code> is written in Scala.</p>
  
  <p>Is this the only way or is there a better approach?</p>