Thank you Zlatko for your response. You said @Input() layout = 'horizontal' will allow me to configure the NavBar layout but how can I dynamically set the layout?
I am trying to drive the components by json configuration. I will give another example here - Let's say the core provides GridComponent, GridEditorComponent and a DesignerComponent. You can visualize designer UI as a hierarchical tree data structure with a max depth of 2 (Controls -> Grid -> GridInstances). The designer tree lists GridComponent at the 1st level along with other controls like "Custom Components" written in the module "B", which I was referring to in my last post. The designer allows us to create new GridComponent / "Cusom Component" instance on the fly that gets added under their respective parent nodes of the tree. User can right click on the "Grid" node and select "New Grid" which displays GridEditorComponent view that allows user to set the component's properties like layout, alternate row color, etc along with a "unique id" before saving it. When you hit the save button on the editor's view, the designer component will instantiate GridComponent and and serialize it to json (so that it can be stored in a configuration store (database) for persistence) and list it under the "Grid" node of the tree with the name equals to the "unique id" provided while creating it. Now I should similarly be able to create another component WorkspaceComponent at runtime, which is also provided by the core and listed in the designer tree. The WorkspaceComponent has a "content" property which is of type string. This content property is set to the "unique id" of any of the grid components or custom components which we just created above or was created before or are persisted in the config store and loaded in the designer tree. I found router-outlet in Angular that can help me achieve this but I am not really sure at this moment. I am still learning Angular, I have a C# background and I can think of a solution to this problem using Unity Container for plugable modules, MEF container for runtime composition, Reflection API for instantiating types on the fly, Serialization for serializing and deserializing instances to and from configuration store. The questions still remain unsolved - - How can I get Module "A" to know about the NavBarMenuItem components defined in module "B" so that it can create the component instances and add them to the NavBar component dynamically? - How can I instantiate a component from its class name as the components are created on fly from the configuration fetched from the store? - When module “B” is dependent on module “A” then module A cannot be statically depend on module B due to circular dependency problem, without using reflection and runtime composition provided by MEF container how can we solve this? Thanks for you help. Gaurav -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
