title: marionette controller object, create dynamic prototype methods?
body: <p>I am using marionette for an app that has many pagess. The controller/router method is repetitive, in each method the view is instantiated and the appRegion shows the view. </p>
  
  <p>I would like to create the methods inside a loop.</p>
  
  <pre><code>var Controller = Marionette.Controller.extend({});
  
  for(i=0;i&lt;10;i++) {
    // build dynamic controller methods
  }
  </code></pre>
  
  <p>I have been learning about object prototypes and I think I can do something like.</p>
  
  <pre><code>var pages = [{'pageButtons': Buttons},{'pageLogin': Login}];
  for(var page in pages) {
    for(var method in pages[page]) {
      console.log(method) // write dynamic method here?
    }
  }
  </code></pre>
  
  <p>My question is the above block, how do I finish it, can I add new methods in a loop? Is there a way to simplify this repetitive task of adding the same code over and over?</p>