angularjs - Dynamic routing in Foundation for Apps with multiple children and multiple parameters -


i trying dynamic routing foundation apps, , can't find out how have multiple parameters in route child of child. route be:

issues/:issuetype/issuedetail/:issueid 

and example is:

issues/severe/issuedetail/123 

in order call 1 of paths in foundation,

<a ui-sref="issues({issuetype: 'severe'})"> severe issues </a> 

my guess (which incorrect) call multiple children parameters is:

<a ui-sref="issues({issuetype: 'severe'}).issuedetail({issueid: '123'})"> issue 123 </a> 

now realize may make more sense call issues/issuedetail/123 rather including first parameter, there case issue id's unique issue type, or there's fact want $stateparams contain both parameters when navigating back.

any appreciated!

you have state each route.

.state( 'issues', { url: '/issues' }, ...) .state( 'issuestype', { url: '/issues/:issuetype' }, ...) .state( 'issuesdetail', { url: '/issues/:issuetype/:issueid' }, ...) 

this simplified further using "nested" or "abstract" states. (here video tutorial on abstract states in ui-router)


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -