Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

we have a requirement like this. we use ui-router

#/plan-details/unlimited
#/plan-details/unlimited/country-id/10024
#/plan-details/local/county-id/12322
#/plan-details/national/country-id/10024/state-id/12322
#/plan-details/state/state-id/12322/country-id/10024

here the url pattern is:

#/plan-details/:planCode/country-id/10024/state-id/12322

here some times country-id may present or may not present and some times state-id may present or may not present.

We looked at using this

#/plan-details/:planCode/country-id/:countryId/state-id/:stateId

But in our case, countryId is not mandatory and some times URL can be simply

#/plan-details/:planCode/state-id/:stateId

How to configure this in ui-router? Thanks in advance.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.