And if my router are like
Code: Select all
'/animal/dog/:id'
Code: Select all
'animal/dog/1'
Code: Select all
'/animal/dog/:id'
Code: Select all
'animal/dog/1'
I have a workaround, but it may not be what you what exactly. Nevertheless, it will look reasonable to the users.syahirdev wrote: ↑04 May 2021, 18:57Hello. I want to ask about the router used in the diamond template. How can I remove the hashtag '#' that attached into the url?
And if my router are likehow can I make the breadcrumb shown at the AppTopBar to just show 'Dog'? currently it showing the full label like thisCode: Select all
'/animal/dog/:id'
Code: Select all
'animal/dog/1'
Code: Select all
const label = props.meta.label;
return <>{location.pathname === '/' ? <span>Current Working</span> : <span>{label}</span>}</>
Code: Select all
// using the replace function
const label = props.meta.label;
return <>{location.pathname === '/' ? <span>Current Working</span> : <span>{label.replace(':id', '')}</span>}</> // expected output -> /animal/dog/
Users browsing this forum: No registered users and 2 guests