You can create a router function in your application.
On http: ///myapp/index.html ', create a javascript function called getSlug. This function gets the URL of the path and splits the string based on '/', the result will be: [0] store [1] [product-slug]
Create a function for the content router. You need to have a column in the product table with a bullet.
The router function will receive a bullet array. In this function, you need to implement the structure of your application.
For example, every time the fisrt element is a “repository”, load the html of the products in a div.
This is a single user application. Each time loading this page, call this function:
$(document).on('load', function(){ router(); )
source share