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.

4
  • 1
    stackoverflow.com/questions/12524533/… Commented Sep 4, 2013 at 11:39
  • 1
    Think whether they have be part of querystring or url. Url is more of parent->child->child format, but if they are just parameters querystring can be used. Commented Sep 4, 2013 at 12:03
  • any reply? i too have same issue Commented Nov 21, 2013 at 12:48
  • @kans unfortunately not, I have just make a list of 20 params and check is there set or not. Commented Nov 21, 2013 at 21:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.