flosse / scaleApp

scaleApp is a JavaScript framework for scalable and maintainable One-Page-Applications

Home Page:http://www.scaleapp.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Async. loading of modules and templates

lorefnon opened this issue · comments

Since the start function which instantiates a module already accepts a callback, I was wondering if it would be a good idea to be able to just register the path of an amd module which would be lazily loaded when the module is instantiated (start or startAll is called)

Hi lorefnon,
You're right, loading modules in an asynchronous way is a good idea. Feel free to modify the code to support that feature :) Otherwise it'll take some time until I can do that.

Good to know you appreciate the idea. I'll try to work on it.

Great! ...and be aware of the refactor branch that has some bigger changes for v0.4.x

I just added an example with RequireJS. I think that could be a way to load modules and templates asynchronously. If you want to have an more convenient way you could write a small plugin for that.