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.

Fribu - Smart Solutions
  • 2,734
  • 3
  • 27
  • 60

0 Answers0