0

I have a design,

Where Im having lots of products and then each product has lots of sub products.

So Now in the First Screen I want to show a dashboard which will show all of my products.

On click of each product I want to open a separate view with its own left side navigation bar and detail view. These will be my main modules

now options in left side menubar will be my sub-products. Now click of any subproduct. I want to change my detail view. These will be my sub modules

Please share some sample example if you have with yourself

Thanks in advance.

Speedyankur
  • 152
  • 6

1 Answers1

0

BoilerplateJS supports having nested contexts. More information is available under 'Product Modules' section in boilerplatejs.org. A nested context can be created by passing the parent context in to the child context when creating it. You can create a context for each of your products. And within that context you can create modules, which will be your sub products. Having this type of a modular structure would help you in maintaining your code.

Implementing your requirement can be done in many ways.

One method is to structure the urls of your application as follows:

www.myapp.com/index.html#productA/submodule1
www.myapp.com/index.html#productB/submodule1

You can implement the menu as a seperate module, where it will change the menu that needs to be displayed according to the first portion (productA, productB) of your URL, and your sub modules can be activated/de-activated according to the rest of the URL portion. This method allows you to bookmark the pages and bring it to the same state when a bookmarked link is triggered.

janith
  • 1,025
  • 5
  • 21