I have reasonably reasonable Ember.Application ("MyApp"). I wrote it as a separate page with controlled ember, but now I want to create an instance of N-instances of the application located inside an existing (non-ember) page.
Ember docs on Ember.Application assume that the application must be both a class namespace and the root of a singleton-instance instance, but in this case I need one class namespace and several instances. I do not want to load classes separately for each instance, they are actually quite large, and mobile is the main use case.
I currently have:
MyApp = Ember.Application.create({ /* app state */); // namespace & instance
MyApp.SomeSupportingClass1 = ...
My impulse should do:
MyApp = Ember.Object.create(); // namespace
MyApp.MyApp = Ember.Application.extend({ /* app state */ }); // instance class
MyApp.myAppInstances = Ember.ArrayController.create(); // instances of MyApp.MyApp
MyApp.SomeSupportingClass1 = ...
? "ember-y" ?