Skip to content

Instantly share code, notes, and snippets.

@CoreyTrombley
Created May 18, 2015 17:28
Show Gist options
  • Save CoreyTrombley/196922603be5f7729114 to your computer and use it in GitHub Desktop.
Save CoreyTrombley/196922603be5f7729114 to your computer and use it in GitHub Desktop.
<Route name="resourceList" path="/list/:resourceType" handler={AdminList} />
{/* may need nested route for tab Selections */}
<Route name="details" path="details" >
<Route name="companies" path=":resourceType" >
<Route name="companyId" path=":resourceId" >
<Route name="resourceDetail" path=":detailTab" handler={AdminDetails} >
<Route name="createBrand" path="/create/brand" handler={AdminCreateBrand} />
</Route>
</Route>
</Route>
</Route>
@ryanflorence
Copy link

/create/brand is an absolute URL because it starts with /, but in order for its parent routes to work, you need the parent route parameters, which are :detailTab, :resourceId, :resourceType. What do you want the url to look like for createBrand?

Also, you've go two :resourceType segments (from resourceList and companies).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment