I need to develop a component in ember.
The component logic is somewhat isolated from main application and can be created as a seperate isolated application, with states and routes within the component.
Presently I have root controller of component as 'ApplicationController' to enable routing, the name 'applicationController' looks like hard coded.
Now I have the main application with its 'ApplicationController' + related routing, and my component with its 'ApplicationController' + related routing. It looks hard to integrate them.
Is there any way to have multiple components like this seperated my namespaces? See comments here
So the main concern is a method to develop an ember component with routin/states in isolation, that is easy to integrate back with main application which also has routing/states.
EDIT
I have two values in component that is bound to main application that is the only integration. Also component routes must come as part of application route once integrated.
Eg: #/approuteforcomponent/componentroute/componentroute2/
While developing I should be able to do just
#/approuteforcomponent -- shows a page saying component under construction
#/componentroute/componentroute2/
That being said, the main issue I have now is about both main application and component using 'ApplicationControler
UPDATE
Similar Question
What is the degree of integration you wish to achieve, back with main application? I mean: is the wanted isolation only related to code structure? or aims to factorized components reuse?
Are main app & component routing really unrelated?
You have at least two possible approaches:
You could setup several ember applications, with possible weak relations between them, but the routing relies on browser's base state, so it does not sounds like it makes sense to have several routers instanciated simultaneously with concurrent location management...
You also could develop your app with an addons architecture, having addons reopening the main app's routes, and stronger relations between app & addons (that's what we are doing here where I am working...)