0

I am working on my first Angular app and it's really cool.

I have some trouble to work with routers

I have some routings:

.when("/products/:productcat", { templateUrl : "/home/config", controller : "configController" })
.when("/products/:productcat/:nx/:nxvalue", { templateUrl : "/home/config", controller : "configController" })

I have a configurator, and I wont to pass more parameters as I can define in rountig provider. I illustrated to steps of configurating a product, but there are about 7-20 steps. Whats is the best way to handle it?

What I mean looks like this:

.when("/products/:productcat/:nx/:nxvalue", { templateUrl : "/home/config", controller : "configController" })
.when("/products/:productcat/:nx/:nxvalue/:nx2/:nxvalue2", { templateUrl : "/home/config", controller : "configController" })
.when("/products/:productcat/:nx/:nxvalue/:nx2/:nxvalue2/:nx3/:nxvalue3", { templateUrl : "/home/config", controller : "configController" })

But I cant create about 30 routs and check each time are all parameters set or not.

Alexander_F
  • 2,831
  • 3
  • 28
  • 61

0 Answers0