I'm trying to asynchronously load a JS file on demand (on user input), that contains another mithril module, with the asynchronous module loader technique described at http://lhorie.github.io/mithril-blog/integrating-mithril-and-requirejs.html
The only way I could make this work was to call the async load module function and instantiate the new loaded module's constructor from a base module controller that gets called from a view's onlick function.
Since the documentation states that we shouldn't instantiate a new controller from a view (or call a function that does - this is my case), I was wondering if this is considered anti-pattern and if there's a better way of doing this.
Thanks in advance.